Re: [PHP-DEV] Conditional class definition in PHP 4.3.x

2004-01-11 Thread Andi Gutmans
I fixed this problem. I agree it's not great coding but there's no real reason to break BC on this issue. I also fixed the problem with conditional function declerations being on the same line. Andi At 03:37 PM 1/5/2004 +0100, Marcus Boerger wrote: Hello internals, version 5 does neither suppo

Re: [PHP-DEV] Conditional class definition in PHP 4.3.x

2004-01-09 Thread Johannes Schlueter
Hi, Zeev Suraski wrote: Wow, that's a neat one. Took me a while to realize what the heck is going on, but basically it has to do with the way the engine mangles function/class names. It's based on the file name and the line number. This *usually* works, practically, it always works except fo

Re: [PHP-DEV] Conditional class definition in PHP 4.3.x

2004-01-06 Thread Zeev Suraski
At 18:58 06/01/2004, Alan Knowles wrote: This only affects single line conditional class and function declarations. php -r ' if (1) { function test () { echo "1"; }} else { function test() { echo "0"; }} test();' It affects php4.3.2 and up. (and probably alot earlier) Wow, that's a neat one.

Re: [PHP-DEV] Conditional class definition in PHP 4.3.x

2004-01-06 Thread Alan Knowles
This only affects single line conditional class and function declarations. php -r ' if (1) { function test () { echo "1"; }} else { function test() { echo "0"; }} test();' It affects php4.3.2 and up. (and probably alot earlier) if you lay this out in a file, it works perfectly: eg. if (1) {

Re: [PHP-DEV] Conditional class definition in PHP 4.3.x

2004-01-05 Thread Andi Gutmans
This is strange. I remember it used to work. We'll look into it. Andi At 03:37 PM 1/5/2004 +0100, Marcus Boerger wrote: Hello internals, version 5 does neither support nested classes nor conditional classes. Not supporting the former is a bit of a loss but the latter leads to ugly software desig

[PHP-DEV] Conditional class definition in PHP 4.3.x

2004-01-05 Thread Marcus Boerger
Hello internals, version 5 does neither support nested classes nor conditional classes. Not supporting the former is a bit of a loss but the latter leads to ugly software design so no worry here. Anyway i tried the test script with 4.3.5-dev and there conditional classes are present but not worki