php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #19431 Stopping include execution from within a function
Submitted: 2002-09-16 04:54 UTC Modified: 2011-01-01 00:59 UTC
From: thomas at unifiedconsulting dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.2.2 OS: RedHat 7.1
Private report: No CVE-ID: None
 [2002-09-16 04:54 UTC] thomas at unifiedconsulting dot com
Currently, according to the docs for return(), "If called from the global scope, then execution of the current script file is ended. If the current script file was include()ed or require()ed, then control is passed back to the calling file." However, there does not seem to be a way to pass control back to the calling file from within a function. If this is by design for some reason, maybe it should be noted. Otherwise, either return should be modified some how to support this functionality (doubtful) or some other function should be provided to give this capability.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 00:59 UTC] jani@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2011-01-01 00:59 UTC] jani@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.


 [2011-01-01 00:59 UTC] jani@php.net
-Package: *General Issues +Package: Scripting Engine problem
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 20:01:31 2024 UTC