Re: [PHP-DEV] Zend and flex problem

2004-10-07 Thread Derick Rethans
On Wed, 6 Oct 2004, Frank M. Kromann wrote: > Thanks Derick, > > I think I'll take the easy solution for now and get the box configured. Like everybody else ;-) Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP Internals - PHP Runtime Development Mail

[PHP-DEV] Shall we remove including config.w32.h and php_config.h from php_scandir.c?

2004-10-07 Thread Kamesh Jayachandran
Hi All, In main/php_scandir.c we are conditionally including config.w32.h for windows and php_config.h for others. As we are including the php_scandir.h also I feel including config.w32.h and php_config.h is not necessary(php_scandir.h has already would have included either config.w32.h or php_conf

[PHP-DEV] proposal

2004-10-07 Thread val khokhlov
Hello, i have small proposal (maybe, it was already discussed here?) - about ignoring shell invocation lines at the beginning of source file, kind of #!/usr/local/bin/php reason is simple - CGI compliance, so that php scripts could work with any web-server (both via standard CGI and vi

Re: [PHP-DEV] proposal

2004-10-07 Thread Andi Gutmans
This has already been discussed in the past (I think a couple of years ago) and it was decided not to make these changes. Frankly, I don't quite remember the discussion but it might be a good place for you to start. About the attachment, it didn't come through. Guys, maybe we can calm down this a

[PHP-DEV] switch() and default:

2004-10-07 Thread Frank M. Kromann
Hello Everyone, I just discovered a small thing in the switch() statement. The position of the default: clause has to be at the end of the code: $a = 1; switch ($a) { default : case 0 : $b = 1; break; case 1 : $b = 2; break; } echo $b; // should print 2 but it pri

Re: [PHP-DEV] switch() and default:

2004-10-07 Thread Andi Gutmans
It's always been like that and has been documented for ages in the manual. Andi At 08:24 PM 10/7/2004 -0700, Frank M. Kromann wrote: Hello Everyone, I just discovered a small thing in the switch() statement. The position of the default: clause has to be at the end of the code: $a = 1; switch ($a) {

Re: [PHP-DEV] switch() and default:

2004-10-07 Thread Benj Carson
Hi, Sorry, I forgot to CC my last reply to the list. I noticed similar behaviour and filed a bug report: 30285. The case described in the bug report is as follows: $x = "a"; switch ($x) { default: echo "default"; break; case "a": echo "a"; break; } // Prints "a" Even though the do

Re: [PHP-DEV] switch() and default:

2004-10-07 Thread David Vance
prints "a" on 4.2.3 Novell, 4.3.3 Linux, 5.0.0 Windows. On Fri, October 8, 2004 12:21 am, Benj Carson said: > Hi, > > Sorry, I forgot to CC my last reply to the list. I noticed similar > behaviour and filed a bug report: 30285. The case described in the bug > report is as follows: > > $x = "a";

[PHP-DEV] why to call php_output_activate(TSRMLS_C) from php_module_startup

2004-10-07 Thread Kamesh Jayachandran
Hi All, I could see php_output_activate(TSRMLS_C) getting called from php_module_startup immedeately after php_output_startup. Why is this needed? As each SAPI modules call php_output_activate(TSRMLS_C) explicitly as a part of request startup. Why am I concerned about this? Ans: php_output_activ

Re: [PHP-DEV] switch() and default:

2004-10-07 Thread Ron Korving
No matter what behaviour PHP shows, I would find it bad coding if you place default anywhere but at the bottom, simply because you might run into unexpected behaviour in other versions of the PHP engine, which I assume you're experiencing now. You could've seen this coming. When you write a switch,

Re: [PHP-DEV] switch() and default:

2004-10-07 Thread Benj Carson
Coming from C (or Java), I find the new behaviour a little strange. If you use default to match invalid conditions, putting it at the beginning of a switch doesn't seem to be poor practice to me (putting it in the middle would be pretty ugly though). IMO, stating what happens to bogus values a