|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-06-08 10:25 UTC] mfischer@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 12:00:01 2025 UTC |
Sample: <?php $arr = array( 'string' => 'a string', 'anotherstring' => 'b string' ); print(key($arr)."\t"); print(intval(key($arr))."\n"); if(key($arr) == intval(key($arr))) { print("Equal!\n"); } else { print("Not equal\n"); } if(key($arr) === intval(key($arr))) { print("Equal!\n"); } else { print("Not equal\n"); } ?> Output: string 0 Equal! Not equal That really defeats the use of intval(). Confirmed on BSD/OS and Native windows/isapi.