Justtechjobs.com Find a programming school near you






Online Campus Both


php-documentation-list | 2003101

[PHP-DOC] #25865 [Opn->Bgs]: ini_get returns 0 not "" for boolean? From: sniper <email protected>
Date: 10/14/03

 ID: 25865
 Updated by: sniper <email protected>
 Reported By: php dot net at b-a-l-u dot de
-Status: Open
+Status: Bogus
 Bug Type: Documentation problem
 Operating System: Linux
 PHP Version: Irrelevant
 New Comment:

# php -r "var_dump(ini_get('register_globals'));"
string(0) ""

Previous Comments:
------------------------------------------------------------------------

[2003-10-14 11:44:46] php dot net at b-a-l-u dot de

Description:
------------
http://www.php.net/manual/en/function.ini-get.php
tells me that

"When querying boolean values: A boolean ini value of off will be
returned as an empty string while a boolean ini value of on will be
returned as "1"."

But
echo '['.ini_get('register_globals').']';

displays '[0]' not '[]'?

At least this is the behaviour I have with php-4.1.2 on debian woody.

     Balu
PS: It'd be nice to add the hint of "beyer at <nospam>clickhand dot de"
from the notes on that page regarding casting the value using (bool) to
the main description.

------------------------------------------------------------------------

-- 
Edit this bug report at http://bugs.php.net/?id=25865&edit=1