Re: switch, equality and preg_match

From: Date: Sun, 01 Jul 2001 07:13:28 +0000
Subject: Re: switch, equality and preg_match
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-58590@lists.php.net to get a copy of this message
I can answer #2 for you... http://php.net/manual/en/language.types.type-juggling.php http://php.net/manual/en/language.types.string.php#language.types.string.conversion An excerpt from "String Conversion": The value is given by the initial portion of the string. If the string starts with valid numeric data, this will be the value used. Otherwise, the value will be 0 (zero). It might be a good idea if switch didn't convert its types, but then that would be inconsistent with the rest of the language, so maybe not.

« previous php.dev (#58590) next »