note 59025 added to function.array
| From: | James at osu1 dot php dot net | Date: | Thu, 24 Nov 2005 09:04:21 +0000 |
| Subject: | note 59025 added to function.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99014@lists.php.net to get a copy of this message | ||
re: m.izydorski 29-May-2005 07:17
The reason the code snippet below is "very slow" is because the backtick (`) is a shell
call delimiter, not a string delimiter. Every element of the array would be executed as a shell call
and the result stored as array elements.
<?
// Very slow:
$my_array = array(
sign, cat01, cat02, ... ,
cat40,terra01, terra02, ... , terra50);
?>
See the backtick operator page for more information:
http://uk2.php.net/manual/en/language.operators.execution.php
----
Manual Page -- http://www.php.net/manual/en/function.array.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59025
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59025&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59025&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59025&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59025&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59025&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59025&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59025&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59025&report=yes
Search -- http://master.php.net/manage/user-notes.php