note 89936 deleted from function.is-string by danbrown
| From: | danbrown@php.net | Date: | Mon, 30 Mar 2009 13:55:02 +0000 |
| Subject: | note 89936 deleted from function.is-string by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152618@lists.php.net to get a copy of this message | ||
Note Submitter: forez.ws
----
<?
//if CONS is not a defined constant
$foo = CONS;
if (is_string($foo)) {
echo '$foo is string';
} else {
echo '$foo is not a string';
}
//outputs: $foo is string
define( 'CONS', 30 );
$foo = CONS;
if (is_string($foo)) {
echo '$foo is string';
} else {
echo '$foo is not a string';
}
//outputs: $foo is not a string
?>