|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67833 exit terminates execution NOT only current script
Submitted: 2014-08-13 09:54 UTC Modified: 2014-10-26 16:23 UTC
From: janusz dot witrykus at gmail dot com Assigned: salathe (profile)
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2014-08-13 09:54 UTC] janusz dot witrykus at gmail dot com
From manual page:

It is not clear for me, I think, that exit terminates execution not only current script but all scripts above current script.

It terminates execution all application, I think.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-09-21 06:29 UTC]
-Status: Open +Status: Feedback
 [2014-09-21 06:29 UTC]
I have no idea what the problem is, I don't know what "scripts above current script" means.

Please try to explain the problem precisely.
 [2014-09-21 10:38 UTC] janusz dot witrykus at gmail dot com
-Status: Feedback +Status: Open
 [2014-09-21 10:38 UTC] janusz dot witrykus at gmail dot com
we have:
"exit — Output a message and terminate the current script".
What does "current script" there mean?

we have:
"If called from the global scope, then execution of the current script file is ended. If the current script file was included or required, then control is passed back to the calling file".

With "exit", all scripts that require or include current script file are terminated too.

Maybe script is not limited to the file, and this is source my misunderstanding, sorry.
 [2014-10-26 16:23 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: salathe
 [2014-10-26 16:23 UTC]
IMHO, "current script" is fine here, and is distinct enough from "current script file".
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 27 01:01:23 2020 UTC