Bug #78132 [Opn->Csd]: PHP 7.4 and later don't associate right line number with BIND_STATIC

From: Date: Sat, 08 Jun 2019 19:48:12 +0000
Subject: Bug #78132 [Opn->Csd]: PHP 7.4 and later don't associate right line number with BIND_STATIC
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221194@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78132&edit=1

 ID:                 78132
 Updated by:         krakjoe@php.net
 Reported by:        derick@php.net
 Summary:            PHP 7.4 and later don't associate right line number
                     with BIND_STATIC
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   *
 PHP Version:        master-Git-2019-06-08 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=006b1911268fca9e6fa9243c2296d614f46e2ccc
Log: Fix #78132 wrong line number on ZEND_BIND_STATIC for lexical vars


Previous Comments:
------------------------------------------------------------------------
[2019-06-08 16:54:48] derick@php.net

Description:
------------
With PHP 7.3, the BIND_STATIC lines are recorded on the right location, with PHP 7.4 they are no
longer. This is with OPcache turned off:

$ php -dopcache.enable_cli=0 -dvld.active=1 /tmp/bind-bug.php


Test script:
---------------
<?php
$someObject->reduce(function () use (
    $outerItem,
    $anotherOuterItem
) {
   return false;
});


Expected result:
----------------
With PHP 7.3:

filename:       /tmp/bind-bug.php
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $outerItem, !1 = $anotherOuterItem
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   EXT_NOP                                                  
   3     1        BIND_STATIC                                              !0, 'outerItem'
   4     2        BIND_STATIC                                              !1,
'anotherOuterItem'
   6     3        EXT_STMT                                                 
         4      > RETURN                                                   <false>
   7     5*       EXT_STMT                                                 
         6*     > RETURN                                                   null


Actual result:
--------------
With PHP 7.4:

filename:       /tmp/bind-bug.php
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $outerItem, !1 = $anotherOuterItem
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   EXT_NOP                                                  
         1        BIND_STATIC                                              !0
         2        BIND_STATIC                                              !1
   6     3        EXT_STMT                                                 
         4      > RETURN                                                   <false>
   7     5*       EXT_STMT                                                 
         6*     > RETURN                                                   null



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=78132&edit=1


Thread (2 messages)

« previous php.bugs (#221194) next »