Bug #20333 [Com]: A return() in an include won't skip registering classes below

From: Date: Mon, 04 Dec 2017 13:03:22 +0000
Subject: Bug #20333 [Com]: A return() in an include won't skip registering classes below
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212900@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=20333&edit=1 ID: 20333 Comment by: spam2 at rhsoft dot net Reported by: mgv at fx dot ro Summary: A return() in an include won't skip registering classes below Status: Not a bug Type: Bug Package: Class/Object related Operating System: Linux PHP Version: 4.2.3 Block user comment: N Private report: N New Comment: what exactly did you not understand in the simple fact that this is a *bug tracker* and not a discussion forum about how PHP internally works? Previous Comments: ------------------------------------------------------------------------ [2017-12-04 13:01:19] phpdoc at mail dot my1 dot info but when a class is put inside an if-statement it doesnt load the class, even though no matter whether you use an if/else statement to stop the code or a return normally the results should be the same. ------------------------------------------------------------------------ [2017-12-04 12:52:48] spam2 at rhsoft dot net jesus that is a default paragrpah at clsoing bugreports which are not bugs and should go to whatever discussion forum - common sense - how do you expect PHP work with a class when it's not registered at compile time? PHP is a *compiled language* for many years now https://de.slideshare.net/jpauli/quick-tour-of-php-from-inside ------------------------------------------------------------------------ [2017-12-04 12:45:32] phpdoc at mail dot my1 dot info also the reporter of this bug was directed to the manual, but WHERE is this behavior described. I checked the main page about classes (pretty much where that should be) but I didnt find it in the page's text. ------------------------------------------------------------------------ [2017-12-04 12:45:19] spam2 at rhsoft dot net > sorry if I dont really understand too much of what happens low level > but that's specifically why I ask on why this happens you confuse a *bugtracker* with stackoverflow ------------------------------------------------------------------------ [2017-12-04 12:41:35] phpdoc at mail dot my1 dot info but why does compiling the PHP file make the class available even though it shouldnt be yet? code that is not a class gets stopped properly so why not the class itself? sorry if I dont really understand too much of what happens low level but that's specifically why I ask on why this happens. ------------------------------------------------------------------------ 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 https://bugs.php.net/bug.php?id=20333 -- Edit this bug report at https://bugs.php.net/bug.php?id=20333&edit=1

« previous php.bugs (#212900) next »