Re: [PHP] Using constructs like unset() in expressions like ()()
Ciao Tomas, I'm not sure if I followed your question completely but do you mean to test a variable or an array element and unset it if it matches a certain type? If so, then maybe: http://it.php.net/is_int is_bool(), is_float(), is_numeric(), is_string(), is_array(), and is_object() will be of help? Ian On Wed, 2004-12-15 at 22:36 +0100, Tomas Tintera wrote: Hi all. Is there some construct, which evaluates any type of its parameter (like t_echo, t_unset) and returns some value with normal type (like 0)? What? I would like to unset a variable in an operation like ()?unset():() and I can not use if because if does not return normal type of value (like 0 or 'a') and can not be used in operations like () (). Tomas Tintera -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using constructs like unset() in expressions like ()()
Tomas Tintera wrote: Is there some construct, which evaluates any type of its parameter (like t_echo, t_unset) and returns some value with normal type (like 0)? What? I would like to unset a variable in an operation like ()?unset():() and I can not use if because if does not return normal type of value (like 0 or 'a') and can not be used in operations like () (). Nor sure I understand that question at all, but... http://php.net/gettype http://php.net/assert http://php.net/is_int You may also want to look at type-casting: http://php.net/language.types.type-juggling.php http://php.net/settype If none of those solve what you want, read the whole front section of the PHP manual on-line -- Up to the Function Reference section. I think what you want is in there somewhere. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using constructs like unset() in expressions like ()()
Hi all. Is there some construct, which evaluates any type of its parameter (like t_echo, t_unset) and returns some value with normal type (like 0)? What? I would like to unset a variable in an operation like ()?unset():() and I can not use if because if does not return normal type of value (like 0 or 'a') and can not be used in operations like () (). Tomas Tintera -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php