note 68386 added to function.array
| From: | Craig at frostycoolslug dot com | Date: | Tue, 25 Jul 2006 11:39:01 +0000 |
| Subject: | note 68386 added to function.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115141@lists.php.net to get a copy of this message | ||
Just a helpful note, when creating arrays, avoid doing:
<?php
$var[key] = "value";
?>
PHP will look for a constant called 'key' before it will treat it as a string, thus
slowing down execution (I've seen files with thousands of these and PHP taking over a second to
execute).
Always concider switching on E_NOTICE before releasing any PHP, it'll help avoid making simple
mistakes.
----
Server IP: 85.116.0.130
Probable Submitter: 217.150.114.226
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.array.php
Edit -- http://master.php.net/note/edit/68386
Del: integrated -- http://master.php.net/note/delete/68386/integrated
Del: useless -- http://master.php.net/note/delete/68386/useless
Del: bad code -- http://master.php.net/note/delete/68386/bad+code
Del: spam -- http://master.php.net/note/delete/68386/spam
Del: non-english -- http://master.php.net/note/delete/68386/non-english
Del: in docs -- http://master.php.net/note/delete/68386/in+docs
Del: other reasons-- http://master.php.net/note/delete/68386
Reject -- http://master.php.net/note/reject/68386
Search -- http://master.php.net/manage/user-notes.php