note 24351 modified in functions by jmcastagnetto

From: Date: Tue, 13 Aug 2002 23:19:21 +0000
Subject: note 24351 modified in functions by jmcastagnetto
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34971@lists.php.net to get a copy of this message
[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. --was-- 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. http://www.php.net/manual/en/functions.php

« previous php.notes (#34971) next »