#24366 [Opn->Bgs]: Declaring a function without () produces no output
| From: | philip@php.net | Date: | Fri, 27 Jun 2003 18:55:23 +0000 |
| Subject: | #24366 [Opn->Bgs]: Declaring a function without () produces no output | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-42648@lists.php.net to get a copy of this message | ||
ID: 24366
Updated by: philip@php.net
Reported By: fmaillet at vizfx dot ca
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows 2000
PHP Version: 4.3.1
New Comment:
I get:
Parse error: parse error, expecting `'('' in /tmp/24366.php on line 6
Be sure to check your error settings, like display_errors and
error_reporting.
Previous Comments:
------------------------------------------------------------------------
[2003-06-27 13:46:59] fmaillet at vizfx dot ca
Description:
------------
I'm not sure if this is a bug but I think there should be an error
message. When you declare a function and don't add () before the {, you
get no output at all, not even an error message.
I posted an exemple of code. I know I'm not calling the function but
something should happen. Either "This is a test" being printed or an
error concerning the function declaration.
Reproduce code:
---------------
<?
echo "This is a test<br>";
function MyFunction {
echo "This is an other test";
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24366&edit=1