Strange conversion

From: Date: Sun, 17 Dec 2000 00:47:42 +0000
Subject: Strange conversion
Groups: php.dev 
Request: Send a blank email to php-dev+get-41627@lists.php.net to get a copy of this message
Hello, I encoutered the following strange behavior: var_dump ($argv); // argv being an array $ar2 = explode (" ", $argv); // I'm passing an array instead // of the expected string var_dump ($ar2); // Dumping the result This is the output: array(1) { [0] => string(3) "foo" } array(1) { [0] => string(5) "array" } Ok, I know it's a typo, but Jani and I think we should issue a warning when someone passes an array as the 2nd parameter to explode and then return FALSE. I've the patch already done, but I thought that I should consult php-dev first. Derick Rethans --------------------------------------------------------------------- PHP: Scripting the Web - www.php.net - derick@php.net --------------------------------------------------------------------- JDI Media Solutions - www.jdimedia.nl - d.rethans@jdimedia.nl H.v. Tussenbroekstraat 1 - 6952 BL Dieren - The Netherlands --------------------------------------------------------------------- "God is real, unless declared integer" - Michal Zalewski ---------------------------------------------------------------------

« previous php.dev (#41627) next »