Re: Changing the default value of "true" for CURLOPT_SSL_VERIFYHOST

From: Date: Thu, 25 Oct 2012 10:46:04 +0000
Subject: Re: Changing the default value of "true" for CURLOPT_SSL_VERIFYHOST
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-63621@lists.php.net to get a copy of this message
On 25 October 2012 18:38, Sebastian Krebs <krebs.seb@gmail.com> wrote: > 2012/10/25 crankypuss <fullmoon@newsguy.com> >> Booleans ought to be 1 and 0. Casting a boolean to 2 is just wrong, a way >> to fix badly written code a few people have written and in so doing risk >> the breakage of far more code that is correct. > > > Thats not completely true. Boolean 'false' is equal to 0 and Boolean 'true' > is something different than 0, that _may_ be 1 (and in most cases is), but > it's not limited too. Just said. In general that's true, but the PHP manual explicitly documents the result of a boolean to integer conversion as 0 and 1: http://au1.php.net/types.integer Adam

« previous php.internals (#63621) next »