Bug #16739 Updated: `print' variable function call fails.
| From: | georg@php.net | Date: | Fri, 10 May 2002 12:15:39 +0000 |
| Subject: | Bug #16739 Updated: `print' variable function call fails. | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-7392@lists.php.net to get a copy of this message | ||
ID: 16739
Updated by: georg@php.net
Reported By: marshall@magpcss.com
Status: Analyzed
-Bug Type: Variables related
+Bug Type: Documentation problem
Operating System: FreeBSD 4.5,RedHat 2.4.7,Win XP
PHP Version: 4.3.0-dev
-Assigned To:
+Assigned To: georg
New Comment:
Its wrong in the documentation. Assigned to myself
Previous Comments:
------------------------------------------------------------------------
[2002-05-10 01:32:58] philip@php.net
Confirmed with PHP 4.3.0-dev (cgi) (may 09, 2002)
PHP Fatal error: Call to undefined function: print() in...
This behavior is documented as working in at least two
places. These changes to phpdoc were made on March 05,
2002. So:
a) Did this used to work?
b) Will it work in the future?
c) Should this be documented/undocumented?
I'm guessing it never worked but may in the future.
In the very least, a version of (c) needs to happen.
I can only confirm 4.1.2 through php4-cvs at this time.
print:
http://cvs.php.net/diff.php/phpdoc/en/functions/strings.xml?r1=1.164&r2=1.165
Variable functions:
http://cvs.php.net/diff.php/phpdoc/en/language/functions.xml?r1=1.24&r2=1.25
------------------------------------------------------------------------
[2002-04-22 23:54:40] marshall@magpcss.com
According to the official PHP documentation
[http://www.php.net/manual/en/functions.variable-functions.php] the
language construct `print' can be called as a variable function. The
following code should therefore be valid:
$myfunc = 'print';
$myfunc('My text to print');
Attempting to execute this code on any platform returns a "Fatal error:
Call to undefined function: print()" message.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16739&edit=1