#46608 [Com]: Return() Not Documented Correctly

From: Date: Sun, 21 Dec 2008 09:21:24 +0000
Subject: #46608 [Com]: Return() Not Documented Correctly
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1652@lists.php.net to get a copy of this message
ID: 46608 Comment by: php at info-svc dot com Reported By: php at info-svc dot com Status: To be documented Bug Type: Documentation problem Operating System: Linux PHP Version: Irrelevant New Comment: tag: Robert Chapin Previous Comments: ------------------------------------------------------------------------ [2008-11-22 14:40:13] lbarnaud@php.net   ------------------------------------------------------------------------ [2008-11-18 22:52:08] php at info-svc dot com Description: ------------ I'm reporting a documentation comment that was rejected but should be valid. "Note that since return() is a language construct and not a function, the parentheses surrounding its arguments are not required." Far from optional, the parentheses actually cause an error when used as described in the documentation regarding include/require. Reproduce code: --------------- test1.php <?php require 'test2.php'; ?> test2.php <?php return(); ?> Actual result: -------------- PHP Parse error: syntax error, unexpected ')' in test2.php on line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46608&edit=1

« previous php.doc.bugs (#1652) next »