Bug #67117 [Opn->Fbk]: Interactive shell and suppressed fatals

From: Date: Fri, 03 Aug 2018 13:56:04 +0000
Subject: Bug #67117 [Opn->Fbk]: Interactive shell and suppressed fatals
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216557@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67117&edit=1 ID: 67117 Updated by: cmb@php.net Reported by: joni2back at gmail dot com Summary: Interactive shell and suppressed fatals -Status: Open +Status: Feedback Type: Bug Package: CGI/CLI related Operating System: Debian 7 PHP Version: 5.5.11 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: I cannot reproduce this with PHP-7.1. Can anybody else still reproduce it with any actively supported PHP version[1]? [1] <http://php.net/supported-versions.php> Previous Comments: ------------------------------------------------------------------------ [2014-04-23 14:13:17] joni2back at gmail dot com Description: ------------ Regarding than older versions of PHP such as 5.3 in the interactive shell mode; When a fatal error occurs, this shell exits with 255 code. Actually in 5.5.7, when a fatal error occurs, the shell continues executing code. So, when a possible fatal error is suppressed, the shell will no alert again to other kind of errors Test script: --------------- Example php 5.3 (shell exits with 255): httpd@dev:~$ php -a; echo exitstatus: $? Interactive shell php > @undefined(); exitstatus: 255 httpd@dev:~$ Example php 5.5.7 (shell continues): Interactive shell httpd@dev55:~$ php -a php > $var = 3; php > undefined(); PHP Fatal error: Call to undefined function undefined() in php shell code on line 1 Fatal error: Call to undefined function undefined() in php shell code on line 1 php > echo $var . "\n"; 3 Example php 5.5.7 (shell continues so weird): php > $var = 3; php > @undefined(); php > echo $var . "\n"; 3 php > notdefined(); php > really_not_defined(); php > @really_not_defined(); php > []+$1 ==== class; php > Expected result: ---------------- Alert on next errors Actual result: -------------- Not alerting next errors (fatal, warnings, syntax, etc) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67117&edit=1

« previous php.bugs (#216557) next »