ini value of On = 1 and Off = "" ? (Re: [PHP-DEV] RFC for new INI's)

From: Date: Tue, 10 Feb 2009 18:30:14 +0000
Subject: ini value of On = 1 and Off = "" ? (Re: [PHP-DEV] RFC for new INI's)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-42988@lists.php.net to get a copy of this message
Sorry to hijack, but ... Christopher Jones wrote: > oci8.events and oci8.old_oci_close_semantics are boolean, so we can > take this opportunity to change the 1 and 0 to On and Off. ... I've never understood why writing On/Off is a good idea, when it is not intuitive that the value returned from ini_get() is of a different content (not meaning, however). Or has this changed in more recent versions? markus@dev01:~$ php -dregister_globals=Off -r 'var_dump(ini_get("register_globals"));' string(0) "" markus@dev01:~$ php -dregister_globals=On -r 'var_dump(ini_get("register_globals"));' string(1) "1" markus@dev01:~$ php -dregister_globals=0 -r 'var_dump(ini_get("register_globals"));' string(1) "0" markus@dev01:~$ php -dregister_globals=1 -r 'var_dump(ini_get("register_globals"));' string(1) "1" markus@dev01:~$ php -v PHP 5.2.5-3+lenny1 with Suhosin-Patch 0.9.6.2 (cli) (built: May 27 2008 21:47:08) regards, - Markus

« previous php.internals (#42988) next »