Date: 05/29/98
- Next message: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Previous message: zeev: "[PHP-DEV] CVS update: php3/functions"
- Next in thread: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Reply: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Maybe reply: Zeev Suraski: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: jan <email protected>
Operating system: Linux 2.0.33, BSDI 3.1
PHP version: 3.0 Release Candidate 5
PHP Bug Type: Misbehaving function
Bug description:
I'm not sure if this is to be called a bug or a feature, but this is the problem i have:
- i wrote some apps in PHP3RC4, with excessive use of forms and PHP3-scripts which get form fields POSTed.
These scripts contain many value-checks like "if ($form_field1) do something;" this worked like i expected - empty
fields in the form resulted in "False" in the above statement.
I then upgraded to PHP3RC5 - and now empty form fields result in "True". I realized the new function "empty()"
and changed scripts to use this funktion, but now a form-input of "0" results in "empty()=True".
This behaviour is against all i'm used to in other scripting languages, i must say. Also, i'm not sure what the
intentional use of "empty()" is - a string or Value of "0" isn't an empty variable container for me... or am i totally wrong here?
At least, i really would like to know what the intentional behaviour of PHP3/form fields/variables/empty()/if()
is or should be.
Apart from that - PHP3 becomes better and better! It's a pleasure writing apps for the web with it!
thanks for any help/hint, Jan
- Next message: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Previous message: zeev: "[PHP-DEV] CVS update: php3/functions"
- Next in thread: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Reply: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Maybe reply: Zeev Suraski: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

