Bug #78424 [Asn->Opn]: declare(strict_types=1) causes phpdbg fail with 'Nothing to execute'
| From: | cmb@php.net | Date: | Fri, 19 Mar 2021 11:46:20 +0000 |
| Subject: | Bug #78424 [Asn->Opn]: declare(strict_types=1) causes phpdbg fail with 'Nothing to execute' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232874@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78424&edit=1
ID: 78424
Updated by: cmb@php.net
Reported by: alexey at kopytko dot com
Summary: declare(strict_types=1) causes phpdbg fail with
'Nothing to execute'
-Status: Assigned
+Status: Open
Type: Bug
Package: phpdbg
-Operating System:
+Operating System: Debian
-PHP Version: 7.3.8
+PHP Version: 7.4.15
-Assigned To: cmb
+Assigned To:
Block user comment: N
Private report: N
New Comment:
Thank you. Might be Linux specific then.
Previous Comments:
------------------------------------------------------------------------
[2021-03-19 04:17:58] alexey at kopytko dot com
I'm on Debian testing.
------------------------------------------------------------------------
[2021-03-19 04:16:36] alexey at kopytko dot com
I can still reproduce:
$ cat example2.php | phpdbg -qrrs=
[Nothing to execute!]
$ phpdbg --version
phpdbg 7.4.15 (built: Feb 20 2021 09:45:56)
PHP 7.4.15, Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.15, Copyright (c), by Zend Technologies
I don't see anything looking like a fix for a changelog for 7.4.16
------------------------------------------------------------------------
[2021-03-18 17:02:41] cmb@php.net
I cannot reproduce the reported behavior with PHP-7.4. Did it get
fixed in the meantime? Or is it OS specific, although no OS has
been mentioned?
------------------------------------------------------------------------
[2019-08-17 02:41:50] alexey at kopytko dot com
Description:
------------
It appears adding a strict types declaration makes PHPDBG drop all what it's doing and stop.
E.g. consider this example without strict types:
$ cat example.php
<?php
echo "OK!\n";
$ cat example.php | phpdbg -qrrs=
OK!
And now the same example with strict types:
$ cat example2.php
<?php
declare(strict_types=1);
echo "OK!\n";
$ cat example2.php | phpdbg -qrrs=
[Nothing to execute!]
$ phpdbg --version
phpdbg 0.5.0 (built: Aug 7 2019 09:50:45)
PHP 7.3.8-1, Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.8-1, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.7.0RC2, Copyright (c) 2002-2019, by Derick Rethans
I've seen the same issue in PHP 7.4-beta.
Test script:
---------------
<?php
declare(strict_types=1);
echo "OK!\n";
Expected result:
----------------
OK!
Actual result:
--------------
[Nothing to execute!]
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78424&edit=1