Bug #81076 [Opn->Csd]: Implicit use causes incorrect count in debug info of closures

From: Date: Tue, 25 May 2021 09:27:54 +0000
Subject: Bug #81076 [Opn->Csd]: Implicit use causes incorrect count in debug info of closures
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234008@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81076&edit=1

 ID:                 81076
 Updated by:         git@php.net
 Reported by:        krakjoe@php.net
 Summary:            Implicit use causes incorrect count in debug info of
                     closures
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            *General Issues
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of krakjoe
Revision: https://github.com/php/php-src/commit/213063f6ca0780ea5adf07467a826b348f29b79a
Log: Fix #81076 Invalid implicit binds cause incorrect count in static vars of closure debug info


Previous Comments:
------------------------------------------------------------------------
[2021-05-24 05:45:29] krakjoe@php.net

The following pull request has been associated:

Patch Name: Fix #81076
On GitHub:  https://github.com/php/php-src/pull/7038
Patch:      https://github.com/php/php-src/pull/7038.patch

------------------------------------------------------------------------
[2021-05-24 05:25:00] krakjoe@php.net

Description:
------------
Implicit invalid uses cause incorrect count in debug info of Closures static variables

Test script:
---------------
<?php
var_dump(fn() => [$why, $do, $we, $count]);
?>

Expected result:
----------------
object(Closure)#1 (1) {
  ["static"]=>
  array(0) {
  }
}

Actual result:
--------------
object(Closure)#1 (1) {
  ["static"]=>
  array(4) {
  }
}


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



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


Thread (3 messages)

« previous php.bugs (#234008) next »