php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #70531 Run and quit mode (-rr) should not fallback to interactive mode
Submitted: 2015-09-19 22:35 UTC Modified: 2015-10-02 10:52 UTC
From: j dot tvr at centrum dot cz Assigned: bwoebi (profile)
Status: Closed Package: phpdbg
PHP Version: 7.0.0RC3 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: j dot tvr at centrum dot cz
New email:
PHP Version: OS:

 

 [2015-09-19 22:35 UTC] j dot tvr at centrum dot cz
Description:
------------
Currently having test.php with <?php throw new Exception(); ?> and running phpdbg -qrr test.php will end-up in interactive mode. 

Test script:
---------------
phpdbg -qrr test.php; echo $?

<?php throw new Exception(); ?>

Expected result:
----------------
Fatal error: Uncaught Exception ...
Stack trace:
...
255


Actual result:
--------------
prompt>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-21 16:53 UTC] bwoebi@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: bwoebi
 [2015-09-23 16:30 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bccac3774bade617d88da45e7f1781151bb16160
Log: Fixed bug #70531 (-rr should not fallback to interactive mode in phpdbg)
 [2015-09-23 16:30 UTC] bwoebi@php.net
-Status: Verified +Status: Closed
 [2015-09-23 16:30 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bccac3774bade617d88da45e7f1781151bb16160
Log: Fixed bug #70531 (-rr should not fallback to interactive mode in phpdbg)
 [2015-09-29 13:10 UTC] ab@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bccac3774bade617d88da45e7f1781151bb16160
Log: Fixed bug #70531 (-rr should not fallback to interactive mode in phpdbg)
 [2015-10-01 17:51 UTC] j dot tvr at centrum dot cz
I tested RC4 and it works fine except for two problems

* the exit code is incorrect (https://bugs.php.net/bug.php?id=70614)
* it still ends-up in interactive-mode when the script contains parse error (e.g. `<?php $->`) – can you reopen this or should I send new bug report?
 [2015-10-01 18:08 UTC] j dot tvr at centrum dot cz
Another use-case where it will fallback to interactive mode:

<?php
set_exception_handler(function () {
	exit(123);
});

throw new Exception();
 [2015-10-02 10:52 UTC] bwoebi@php.net
Thanks, fixed them all :-)
 [2016-07-20 11:36 UTC] davey@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bccac3774bade617d88da45e7f1781151bb16160
Log: Fixed bug #70531 (-rr should not fallback to interactive mode in phpdbg)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 08:01:28 2024 UTC