note 78508 added to language.types.string

From: Date: Mon, 15 Oct 2007 19:04:50 +0000
Subject: note 78508 added to language.types.string
Groups: php.notes 
Request: Send a blank email to php-notes+get-131406@lists.php.net to get a copy of this message
The '0e00' == '00' scientific notation strangeness is documented at http://us2.php.net/manual/en/language.operators.comparison.php: "If you compare two numerical strings, they are compared as integers." I don't see any documentation for the odd handling of hexadecimal strings, though. var_dump(intval('0xf')) // int(0) var_dump((int)'0xf') // int(0) var_dump(0 + '0xf') // int(15) var_dump('0xf' == 15) // bool(true) ---- Server IP: 64.71.164.2 Probable Submitter: 63.253.43.10 ---- Manual Page -- http://www.php.net/manual/en/language.types.string.php Edit -- https://master.php.net/note/edit/78508 Del: integrated -- https://master.php.net/note/delete/78508/integrated Del: useless -- https://master.php.net/note/delete/78508/useless Del: bad code -- https://master.php.net/note/delete/78508/bad+code Del: spam -- https://master.php.net/note/delete/78508/spam Del: non-english -- https://master.php.net/note/delete/78508/non-english Del: in docs -- https://master.php.net/note/delete/78508/in+docs Del: other reasons-- https://master.php.net/note/delete/78508 Reject -- https://master.php.net/note/reject/78508 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#131406) next »