Re: [PHP-DEV] PROPOSAL: default value handling

2003-01-12 Thread Nyk Cowham
Ok, this was my mistake in missing the "Ternary operator enhancement for fluent code" (http://marc.theaimsgroup.com/?t=9622016834&r=1&w=2) discussion thread from last year in the archives. It was not my intention to reopen a dead thread. I did make best effort to do prior research in the

Re: [PHP-DEV] PROPOSAL: default value handling

2003-01-11 Thread Andi Gutmans
This has been discussed in the past and won't be done. PHP behaves like C where the result of the boolean "or" operation is true or false. Andi At 12:38 AM 1/11/2003 -0500, Nyk Cowham wrote: As a convert from Perl one of the 'features' I miss from Perl is the short-circuit behavior of the or op

[PHP-DEV] PROPOSAL: default value handling

2003-01-10 Thread Nyk Cowham
As a convert from Perl one of the 'features' I miss from Perl is the short-circuit behavior of the or operand (||) and how it can be used to set default values if a passed value is false (0 or ""). Thus, in a passed parameter you can write: $result = $value || $default; In perl if the $value