Re: Bug or Feature: ini_get() return value

From: Date: Wed, 01 May 2002 16:41:29 +0000
Subject: Re: Bug or Feature: ini_get() return value
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-83555@lists.php.net to get a copy of this message
Hello Ian, On Wed, 1 May 2002, Ian Thurlbeck wrote: > Is this a bug or a feature? > > Tested on Apache 1.3.22 + PHP 4.1.2 and > Apache 2.0.35 + PHP 4.2.0RC4 > > With php.ini setting "some_var=On" I get the following: > > ini_get("some_var") returns 1 > > Fair enough. > > If you set "some_var=Off" the results are: > > ini_get("some_var") returns "" > > i.e. ini_get() returns an empty string or undefined or something, whereas I > was expecting "0" - is this a bug? "" is the representatation of FALSE. Try var_dump (ini_get("some_var")); and you will see it is correct. Doing echo FALSE will also show the empty string, so it's perfectly normal. regards, Derick ----------------------------------------------------------------------- Did I help you? Consider a gift: http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B ----------------------------------------------------------------------- PHP: Scripting the Web - derick@php.net All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net -----------------------------------------------------------------------

« previous php.dev (#83555) next »