note 61453 added to language.types.boolean

From: Date: Fri, 03 Feb 2006 19:52:31 +0000
Subject: note 61453 added to language.types.boolean
Groups: php.notes 
Request: Send a blank email to php-notes+get-102942@lists.php.net to get a copy of this message
Due to some internal lookup mechanism, testing for 'true' is faster than testing for 'TRUE', 'True' or other case manglings. It's even faster to test for '0' or '1', but then you're changing the type of the variable, which is not allways advisable. This is probably not going to make a real difference in your script so no need to go regexp-replace in your code, but it's worth it prefering the lowercase 'true' in new code. ---- Server IP: 193.95.141.37 Probable Submitter: 83.141.81.182 ---- Manual Page -- http://www.php.net/manual/en/language.types.boolean.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61453 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61453&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61453&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61453&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61453&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61453&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61453&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61453&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61453&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#102942) next »