Zeev Suraski wrote:
If you take into account that [a] in PHP, you cannot have more than one
signature for a method in a given class, and you take into account the
fact that [b] your overriding method must be able to satisfy the same
interface as the method its overriding
The real solution is
BP_VAR_R just tells the engine not to through a warning when the
property doesn't exist. The problem is that we need to handle cases
like:
$doc = simplexml_load_string('bar');
echo $doc->name["attr"];
echo $doc->name;
Both would be covered by BP_VAR_R AFAIR. What if the string is empty
and th
Basically SimpleXML should know if the property is being fetched for read
or not (type is passed such as BP_VAR_R or BP_VAR_W). If the case is
BP_VAR_R (read access) then SimpleXML should return the value and not an
object.
There might be some places in the engine which aren't covered but it's b
The following script:
buf.= ($string instanceof StringBuffer
? $string->buf
: $string
);
}
}
$s= new StringBuffer();
$s->append('Hello');
?>
causes:
/usr/home/thekid/devel/php/php/Zend/zend_execute.c(4049) : Freeing
0x083B0310 (6 bytes), script=string.php
/usr
Hello Timm,
Friday, February 27, 2004, 7:39:26 PM, you wrote:
> On Fri, 2004-02-27 at 14:39, Stig S. Bakken wrote:
>> On Fri, 2004-02-27 at 14:13, Derick Rethans wrote:
> [...]
>> What is worse is that many PHP 4 APIs need to be completely redesigned
>> for PHP 5, not only the guts of the class.
Hello Adam,
Friday, February 27, 2004, 7:37:15 PM, you wrote:
> I know we discussed this already, but after seeing a couple of bug
> reports about SimpleXML, I'm worried our decision only makes sense to
> us and not to regular users. :)
> Specifically, since elements and attibutes look like stri
On Fri, 2004-02-27 at 14:39, Stig S. Bakken wrote:
> On Fri, 2004-02-27 at 14:13, Derick Rethans wrote:
[...]
> What is worse is that many PHP 4 APIs need to be completely redesigned
> for PHP 5, not only the guts of the class.
>
> IMHO method overloading the the only clean way out of this.
Agre
On Fri, 27 Feb 2004, Andi Gutmans wrote:
> What I suggest is the following:
> a) Don't check signature for constructors.
> b) By default, don't check signature for inheritance *if* we're not
> inheriting from an abstract class. If it is an abstract class we should
> check the signature because it
I know we discussed this already, but after seeing a couple of bug
reports about SimpleXML, I'm worried our decision only makes sense to
us and not to regular users. :)
Specifically, since elements and attibutes look like strings, people
expect them to act like strings. But since they're not objec
On Fri, Feb 27, 2004 at 03:56:07PM -, Nuno Lopes wrote:
> So, what shall I do?
> Mark this bug as bogus or update the documentation. If yes, what should I
> add/remove/modify?
>
> Nuno
There's no problem with the documentation, the behaviour is wrong.
when doing header('HTTP/1.1 404 Not Fou
So, what shall I do?
Mark this bug as bogus or update the documentation. If yes, what should I
add/remove/modify?
Nuno
- Original Message -
> Unless of course there is code in there to look for HTTP/ and set the
> appropriate status code. This code used to be there, but it may have
> g
Hartmut Holzgraefe wrote:
Jakes wrote:
Oh, yes and special methods that you mentioned would come in handy too
but from a object perspective. Maybe explicitly calling some sort
finalize()
method to clean un-referenced objects would also be handy.
finalize() is one of the worst concepts of JAVA
Jakes wrote:
cool, Im going to look more into the engine to see the working.
I suppose PHP it isn't as memory intensive as JAVA
Quick question, does the zend engine have a garbage collector
while we are on the topic?
As said, it uses reference counting.
Cheers,
Michael
"Hartmut Holzgraefe" <[EMA
Using Visual Studio.NET, I can build PHP fine using the php5ts
project/solution.
I have a problem, however, with another project I've added to the
solution which is a custom extension with no external (to PHP) library
dependencies. It was working (compiling, linking, and then being loaded
into PHP
At 10:25 27/02/2004 -0500, Hans Lellelid wrote:
Hi -
Andi Gutmans wrote:
The question is if we should ignore constructors from this check. I think
we should but one person here thought we shouldn't.
I think constructors should be ignored.
OK
Is everyone OK with peforming this check for abstract
Hi -
Andi Gutmans wrote:
The question is if we should ignore constructors from this check. I
think we should but one person here thought we shouldn't.
I think constructors should be ignored.
Is everyone OK with peforming this check for abstract classes and
interfaces? Or do you think it should
cool, Im going to look more into the engine to see the working.
I suppose PHP it isn't as memory intensive as JAVA
Quick question, does the zend engine have a garbage collector
while we are on the topic?
"Hartmut Holzgraefe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jakes wrot
Jakes wrote:
You calling it from the base so cleaning you be easier than
looking for object referenced variables and setting them to null.
Working in a large class hierarchy it could get painful.
__destruct()
and as far as object references in variables are concerned:
the engine destructs all inst
On Fri, 27 Feb 2004, Andi Gutmans wrote:
> At 14:13 27/02/2004 +0100, Derick Rethans wrote:
> >On Fri, 27 Feb 2004, Andi Gutmans wrote:
> >
> > > d) Last problem is that using E_STRICT is not a good idea because we find
> > > this problem at compile-time and the error_reporting might not be set ye
On Feb 27, 2004, at 10:05 AM, Andi Gutmans wrote:
Yeah but people are used to setting the error_reporting from prepend's
or at the beginning of the script. But you know what, I guess we can
live with this because I see a few E_WARNINGS at the compile stage. So
I guess we could go with E_STRICT f
Jakes wrote:
Oh, yes and special methods that you mentioned would come in handy too
but from a object perspective. Maybe explicitly calling some sort finalize()
method to clean un-referenced objects would also be handy.
finalize() is one of the worst concepts of JAVA that i can think of:
a somehow-
At 14:13 27/02/2004 +0100, Derick Rethans wrote:
On Fri, 27 Feb 2004, Andi Gutmans wrote:
> d) Last problem is that using E_STRICT is not a good idea because we find
> this problem at compile-time and the error_reporting might not be set yet.
The INI system is 'booted' before the script is compile
Unless of course there is code in there to look for HTTP/ and set the
appropriate status code. This code used to be there, but it may have
gotten dropped along the way.
-Rasmus
On Fri, 27 Feb 2004, Nuno Lopes wrote:
> Can anybody clarify this, please?
> Nuno
>
>
> - Original Message -
>
You calling it from the base so cleaning you be easier than
looking for object referenced variables and setting them to null.
Working in a large class hierarchy it could get painful.
"Michael Walter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jakes wrote:
> > Oh, yes and special
Jakes wrote:
Oh, yes and special methods that you mentioned would come in handy too
but from a object perspective. Maybe explicitly calling some sort finalize()
method to clean un-referenced objects would also be handy.
How does that differ from $x=null; with a reference-counting garbage
collector
Oh, yes and special methods that you mentioned would come in handy too
but from a object perspective. Maybe explicitly calling some sort finalize()
method to clean un-referenced objects would also be handy.
- Original Message -
From: "Jakes Potgieter" <[EMAIL PROTECTED]>
Newsgroups: php.i
When Im talking about something like this would come in handy
obviously doesnt work! The paramter null could be added, to get
desired result but to be programmatically correct:
class MyOverload{
function __construct($Foo) {
$this->Foo = $Foo;
}
// overload the constructor
funct
Jakes Potgieter wrote:
It would be nice to have a base class to inherit some special
methods as we do in Java.
could you name which ones you think of?
being out of the JAVA camp for several years know i no longer
know all java.object methods and properties by heart, but
PHP mechanisms like __sle
Jakes Potgieter wrote:
It would be nice to have a base class to inherit some special
methods as we do in Java. [...]
What would be useful methods contained in the base class?
Thanks.
- Original Message -
From: "Stephan Schmidt" <[EMAIL PROTECTED]>
Newsgroups: php.internals
To: "'Jakes'"
It would be nice to have a base class to inherit some special
methods as we do in Java. The same as method overloading,
one of the most important aspects missing in PHP5 and the
new object model.
Thanks.
- Original Message -
From: "Stephan Schmidt" <[EMAIL PROTECTED]>
Newsgroups: php.i
Can anybody clarify this, please?
Nuno
- Original Message -
> ID: 27345
> Updated by: [EMAIL PROTECTED]
> Reported By: php_bugs at ecora dot de
> Status: Open
> Bug Type:Documentation problem
> PHP Version: Irrelevant
> New Comment:
>
> I couldn't reproduce thi
Hi,
> > Please can some explain to me what the stdClass is used for in
> > PHP 5. I've tried to use the reflection API to reverse engineer it
> > but it does not give you much on the stdClass
> No. There is no such thing as Java's base class built into PHP.
> stdClass is just an empty "dummy cl
On Fri, 2004-02-27 at 14:15, Jakes wrote:
> Please can some explain to me what the stdClass is used for in
> PHP 5. I've tried to use the reflection API to reverse engineer it
> but it does not give you much on the stdClass
>
> What methods can be inherited from this class?
>
> Does it work the
On Fri, 2004-02-27 at 14:13, Derick Rethans wrote:
> On Fri, 27 Feb 2004, Andi Gutmans wrote:
>
> > d) Last problem is that using E_STRICT is not a good idea because we find
> > this problem at compile-time and the error_reporting might not be set yet.
>
> The INI system is 'booted' before the sc
George Schlossnagle wrote:
On Feb 27, 2004, at 4:12 AM, Andi Gutmans wrote:
Hey,
I'd like to come to some conclusion about the latest changes which
break BC (trying to keep it short because some people here wrote long
essays and it took me too much time to catch up :) :
a) I agree that it does
On Feb 27, 2004, at 4:12 AM, Andi Gutmans wrote:
Hey,
I'd like to come to some conclusion about the latest changes which
break BC (trying to keep it short because some people here wrote long
essays and it took me too much time to catch up :) :
a) I agree that it doesn't make much sense for con
Please can some explain to me what the stdClass is used for in
PHP 5. I've tried to use the reflection API to reverse engineer it
but it does not give you much on the stdClass
What methods can be inherited from this class?
Does it work the same was as the java base class - Object?
On Fri, 27 Feb 2004, Andi Gutmans wrote:
> d) Last problem is that using E_STRICT is not a good idea because we find
> this problem at compile-time and the error_reporting might not be set yet.
The INI system is 'booted' before the script is compiled, so I doubt
that this is a problem.
> What I
Jan Lehnardt wrote:
your patch contains more than just the new testcase.
That's probably the reason, why it wasn't committed
yet.
That's why it says '... and some wordsize stuff' in the subject line.
--
Ard
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.
On Friday 27 February 2004 11:12, Ferdinand Beyer wrote:
> On 27 Feb 2004 at 10:58, Patrick Schnorbus wrote:
> > Mhm. Does a signature make sense if the engine ignores it
>
> anyway?
>
> > For better readability one can use phpdoc/doxygen like comment
>
> blocks.
>
> That's right. But I don't see a
On Friday 27 February 2004 10:12, Andi Gutmans wrote:
> What I suggest is the following:
> a) Don't check signature for constructors.
Okie ;)
> b) By default, don't check signature for inheritance *if* we're not
> inheriting from an abstract class.
> If it is an abstract class we should
> check
Andi Gutmans wrote:
b) By default, don't check signature for inheritance *if* we're not
inheriting from an abstract class. If it is an abstract class we should
check the signature because it's a PHP 5 feature.
Do you mean :
- check the signature only for methods which were in the abstract class
== Quote from Andi Gutmans ([EMAIL PROTECTED])'s article
> a) Don't check signature for constructors.
Constructors are definitely not virtual methods. So no reason to check signature.
Moreover, this is a non sense to declare constructors in interfaces or abstract
constructors in abstract classes.
On 27 Feb 2004 at 10:58, Patrick Schnorbus wrote:
> Mhm. Does a signature make sense if the engine ignores it
anyway?
> For better readability one can use phpdoc/doxygen like comment
blocks.
That's right. But I don't see a reason why we should disallow to use a
signature in an interface declar
On Friday 27 February 2004 10:41, Ferdinand Beyer wrote:
> On 27 Feb 2004 at 11:12, Andi Gutmans wrote:
> > Comments? (Please try to keep them short :)
>
> I think we should just drop the signature check. Interfaces may
> include a signature for better readability but the engine should ignore
> the
AG>> c) Add a new INI option (zend.strict_inheritance_checks) which
AG>> does check signature for methods (except for constructor). I
AG>> don't like new INI options but I don't think there's any way
AG>> out.
There's a dilemma about this option. On one hand, it should be on by
default. Otherwise,
On 27 Feb 2004 at 11:12, Andi Gutmans wrote:
> Comments? (Please try to keep them short :)
I think we should just drop the signature check. Interfaces may
include a signature for better readability but the engine should ignore
them. PHP4 class trees work fine even without strict inheritance
ch
Hey,
I'd like to come to some conclusion about the latest changes which break BC
(trying to keep it short because some people here wrote long essays and it
took me too much time to catch up :) :
a) I agree that it doesn't make much sense for constructors, because one
always creates concrete cl
On Thu, 26 Feb 2004, John Coggeshall wrote:
>
> $reflect = new Reflection_Class("Object");
>
> $docs = $reflect->getDocComment();
> if(!empty($docs)) {
> echo "Has Docs.\n";
> }
>
> if(!empty($reflect->getDocComment())) {
> echo "Has Docs.\n";
> }
>
> ?>
>
49 matches
Mail list logo