Bug #78424 [NEW]: declare(strict_types=1) causes phpdbg fail with 'Nothing to execute'
| From: | alexey at kopytko dot com | Date: | Sat, 17 Aug 2019 02:41:50 +0000 |
| Subject: | Bug #78424 [NEW]: declare(strict_types=1) causes phpdbg fail with 'Nothing to execute' | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-222282@lists.php.net to get a copy of this message | ||
From: alexey at kopytko dot com
Operating system:
PHP version: 7.3.8
Package: phpdbg
Bug Type: Bug
Bug description:declare(strict_types=1) causes phpdbg fail with 'Nothing to execute'
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 bug report at https://bugs.php.net/bug.php?id=78424&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78424&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78424&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78424&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78424&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78424&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78424&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78424&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78424&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78424&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78424&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78424&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78424&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78424&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78424&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78424&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78424&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78424&r=mysqlcfg