Bug #13616 Updated: Compiler complains about function declaration after return is called

From: Date: Wed, 17 Oct 2001 21:34:09 +0000
Subject: Bug #13616 Updated: Compiler complains about function declaration after return is called
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-68166@lists.php.net to get a copy of this message
ID: 13616 Updated by: brianlmoon Reported By: brianm@dealnews.com Status: Suspended Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.0CVS-2001-10-09 Assigned To: ssb New Comment: I have a zend_compile.c that will allow the same function from the same file too pass through with a NOTICE rather than a fatal ERROR. Is this of interest to anyone? It is a good interim solution I think. Previous Comments: ------------------------------------------------------------------------ [2001-10-17 11:53:43] ssb@php.net This turns out to be due to another bug fix (9884), and will probably end up being documented as a compatibility breaker in 4.1.0. I recommend that you use include_once instead. ------------------------------------------------------------------------ [2001-10-11 20:20:06] ssb@php.net Example can be reduced to: test.php: <?php function foo() {} include "test2.php"; ?> test2.php: <?php return; function foo() {} ?> ------------------------------------------------------------------------ [2001-10-10 14:40:32] sander@php.net Reproduced with latest dev from php4win.com (04-Oct-2001). ------------------------------------------------------------------------ [2001-10-10 02:31:17] derick@php.net Marking as fix before release ------------------------------------------------------------------------ [2001-10-09 13:57:28] sander@php.net Reclassified. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=13616 Edit this bug report at http://bugs.php.net/?id=13616&edit=1

« previous php.dev (#68166) next »