|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78424 declare(strict_types=1) causes phpdbg fail with 'Nothing to execute'
Submitted: 2019-08-17 02:41 UTC Modified: -
From: alexey at kopytko dot com Assigned:
Status: Open Package: phpdbg
PHP Version: 7.3.8 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-08-17 02:41 UTC] alexey at kopytko dot com
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 
echo "OK!\n";
$ cat example.php | phpdbg -qrrs=
And now the same example with strict types:

$ cat example2.php 
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:
echo "OK!\n";

Expected result:

Actual result:
[Nothing to execute!]


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jan 20 13:01:28 2021 UTC