[PHP-DEV] Just checking something before posting a bug report

2007-09-26 Thread Martin Alterisio
I did as much as possible from the steps asked in the php bugs page, but still I want to check with you folks before submitting a bug report. I found a strange behavior in PHP 5.2.4. Try running the following code: At the end of the script, the static var stores not the object but the string re

Re: [PHP-DEV] Just checking something before posting a bug report

2007-09-26 Thread Paweł Stradomski
Martin Alterisio wrote > class Foo { >     static public $foo; > >     function __toString() { >         self::$foo = $this; >         return 'foo'; >     } > } > > $foo = (string) new Foo(); > var_dump(Foo::$foo); > ?> Got even stranger result here: string(3) "foo" ALERT - canary mismatch on efr

Re: [PHP-DEV] Just checking something before posting a bug report

2007-09-26 Thread Moritz Bechler
Hi, I can confirm that behaviour (older CVS build) and it seems that you can get that thingy to segfault if you var_dump twice. That might be helpful for investigating that "interesting" behaviour. Backtrace follows... #0 0x0087a3b9 in zend_mm_check_ptr (heap=0xe20710, ptr=0x7fffa5cd22c

RE: [PHP-DEV] [patch] Late static bindings (LSB)

2007-09-26 Thread Baptiste Autin
>People generally prefer compile-time >control which is derived from definition rather than per-instance >runtime control (implementing interface vs. checking each time if class >has certain methods). It's me again, sorry. So, if I understand you well, Stanislas, you are personally not much int

[PHP-DEV] PHP_5_3 Branched

2007-09-26 Thread Ilia Alshanetsky
The 5.3 branch was just created in the CVS and is now open for development. Please remember to MFH/MFB your patches to this branch when making your commits. Thanks, Ilia Alshanetsky Release Master -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.

Re: [PHP-DEV] [patch] Late static bindings (LSB)

2007-09-26 Thread Etienne Kneuss
Hello, if I understand you correctly, you want to radically change the behavior of self:: ? This is not doable as it would break tons of scripts! Regards On 9/27/07, Baptiste Autin <[EMAIL PROTECTED]> wrote: > > >People generally prefer compile-time > >control which is derived from definition r

Re: [PHP-DEV] PHP_5_3 Branched

2007-09-26 Thread Etienne Kneuss
Hello, Thanks! I've that dynamic access of static members patch that is waiting to be commited: $foo::myFunc(); etc.. Here is the patch: http://patches.colder.ch/Zend/dynamic_static_calls_5_3.patch?markup Thanks in advance! Regards On 9/27/07, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote: > > Th

RE: [PHP-DEV] [patch] Late static bindings (LSB)

2007-09-26 Thread Baptiste Autin
You mean, tons of PHP scripts? It would just allow some non-working code (fatal error) to run, by extending the scope of self::. So what could it break? And if you add the obligation to implement an interface (probably under-used in PHP), it is even less likely that it raises side effects. No ? -

Re: [PHP-DEV] PHP_5_3 Branched

2007-09-26 Thread Stanislav Malyshev
The 5.3 branch was just created in the CVS and is now open for development. Please remember to MFH/MFB your patches to this branch when making your commits. Maybe it would be a good idea to start 5.2.5 release cycle soon - so we get rid of pending fixes and need to merge between 5.2 and 5.3?

Re: [PHP-DEV] [patch] Late static bindings (LSB)

2007-09-26 Thread Stanislav Malyshev
So, if I understand you well, Stanislas, you are personally not much into "static::" but more into making that sort of code working : interface iC { public $structure; } abstract class A implements iC { public function display() { echo self::$structure; } }

Re: [PHP-DEV] PHP_5_3 Branched

2007-09-26 Thread Johannes Schlüter
Hi, On Thu, 2007-09-27 at 01:25 +0200, Etienne Kneuss wrote: > Hello, > > Thanks! I've that dynamic access of static members patch that is waiting to > be commited: > $foo::myFunc(); etc.. Done. johannes > Here is the patch: > http://patches.colder.ch/Zend/dynamic_static_calls_5_3.patch?markup

Re: [PHP-DEV] Just checking something before posting a bug report

2007-09-26 Thread Martin Alterisio
Thanks everyone! I've just submitted the report, adding the info you provided. Regards, Martin Alterisio

Re: [PHP-DEV] PHP_5_3 Branched

2007-09-26 Thread Ilia Alshanetsky
I don't think that 5.2.5 will be the last 5.2.X release before 5.3 is released as much as I'd like that to be the case. So, the need to maintain 5.2.X branch will continue even post 5.2.5 release, but I don't disagree with the idea of starting the process of 5.2.5 release in a week or so. On 9/26/

Re: [PHP-DEV] Compiled variables and backpatching

2007-09-26 Thread Stanislav Malyshev
OK, so its a bit of caching. So it sounds like it stores a pointer into the symbol table, so that if $a is redefined it will still be correct. What happens if the symbol table must be rehashed? Does it still work, or does it look it up again? I think rehashing doesn't matter since hash table has

Re: [PHP-DEV] PHP_5_3 Branched

2007-09-26 Thread Stanislav Malyshev
I don't think that 5.2.5 will be the last 5.2.X release before 5.3 is released as much as I'd like that to be the case. So, the need to maintain 5.2.X branch will continue even post 5.2.5 release, but I don't disagree with the idea of starting the process of 5.2.5 release in a week or so. Yes

Re: [PHP-DEV] PHP_5_3 Branched

2007-09-26 Thread Ilia Alshanetsky
Thanks. On 9/26/07, Johannes Schlüter <[EMAIL PROTECTED]> wrote: > > Hi, > > On Thu, 2007-09-27 at 01:25 +0200, Etienne Kneuss wrote: > > Hello, > > > > Thanks! I've that dynamic access of static members patch that is waiting > to > > be commited: > > $foo::myFunc(); etc.. > > Done. > > johannes >

Re: [PHP-DEV] [patch] Late static bindings (LSB)

2007-09-26 Thread Jingcheng Zhang
Hello, static methods seem exactly like dynamic binded methods now, is there any chance that "abstract static function" being restored from E_STRICT limitation? Currently it is allowed in interfaces, but forbidden in abstract class, I don't know why php implements "static method" in this way, t