note 24351 deleted from language.functions by sp
| From: | sp@php.net | Date: | Sun, 22 Jan 2006 08:58:23 +0000 |
| Subject: | note 24351 deleted from language.functions by sp | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-102227@lists.php.net to get a copy of this message | ||
Note Submitter: matt at smidwap dot com
----
[Editor's note: that is the reason why 'function' and others are "reserved
words", see: http://www.php.net/manual/en/reserved.php for
more details]
Creating a function with the name 'function' won't turn up errors, but when calling
that function, nothing will be returned. Example:
<?php
function();
function function () {
print "Hello, world!";
}
// "Hello, world!" will not be printed.
?>
I assume this is because when calling 'function', php thinks you are trying to create a
new function.