note 15233 added to language.types.type-juggling

From: Date: Sun, 02 Sep 2001 17:22:49 +0000
Subject: note 15233 added to language.types.type-juggling
Groups: php.notes 
Request: Send a blank email to php-notes+get-17536@lists.php.net to get a copy of this message
Easy way to cast something like the result of a function to a string: $myString = '' . $db->f('arg'); Concatenating the empty quotes changes the result to a string no matter what type the result is. For instance the $db object might be returning an int in this case, but $myString will have the string equivalent in it. Matt. http://www.php.net/manual/en/language.types.type-juggling.php

« previous php.notes (#17536) next »