note 77544 added to function.is-string
| From: | yarco dot w at gmail dot com | Date: | Mon, 03 Sep 2007 08:19:38 +0000 |
| Subject: | note 77544 added to function.is-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130117@lists.php.net to get a copy of this message | ||
re: php dot net at oui dot jp
<?php
$a = array('0' => 'zero'); // '0'
// is different from
$b = '0'; // '0'
?>
Because when you use array, it will automatically change the key to integer if it could.
So, it output:
>php -r "print var_dump(array_keys(array('0' => '
zero', '1' => 'one')));"
array(2) {
[0]=>
int(0)
[1]=>
int(1)
}
They are int type, not string.
----
Server IP: 123.253.132.202
Probable Submitter: 127.0.0.1 (proxied: 61.171.156.82)
----
Manual Page -- http://www.php.net/manual/en/function.is-string.php
Edit -- https://master.php.net/note/edit/77544
Del: integrated -- https://master.php.net/note/delete/77544/integrated
Del: useless -- https://master.php.net/note/delete/77544/useless
Del: bad code -- https://master.php.net/note/delete/77544/bad+code
Del: spam -- https://master.php.net/note/delete/77544/spam
Del: non-english -- https://master.php.net/note/delete/77544/non-english
Del: in docs -- https://master.php.net/note/delete/77544/in+docs
Del: other reasons-- https://master.php.net/note/delete/77544
Reject -- https://master.php.net/note/reject/77544
Search -- https://master.php.net/manage/user-notes.php