Bug #66622 [Csd]: Closures do not correctly capture the late bound class (static::) in some cases
Edit report at https://bugs.php.net/bug.php?id=66622&edit=1
ID: 66622
Updated by: laruence@php.net
Reported by: drewparoski at gmail dot com
Summary: Closures do not correctly capture the late bound
class (static::) in some cases
Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: CentOS Linux 6.3
PHP Version: 5.5.8
Assigned To: levim
Block user comment: N
Private report: N
New Comment:
as taco at procurios dot nl metioned, this introuducd a new bug : https://bugs.php.net/bug.php?id=69568
Previous Comments:
------------------------------------------------------------------------
[2015-05-04 11:04:58] cmb@php.net
Related To: Bug #69568
------------------------------------------------------------------------
[2014-12-05 11:06:38] taco at procurios dot nl
The fix for this issue introduces a change in previous behaviour for private static methods being
called from a closure in a public / protected static method.
The following script used to output "barbar", currently a fatal error is triggered:
Test script:
--------------
<?php
class Foo
{
private static function bar()
{
echo 'bar';
}
public static function baz()
{
$f = function () { self::bar(); };
$f();
}
}
class Bar extends Foo {}
Foo::baz();
Bar::baz();
------------------------------------------------------------------------
[2014-06-09 02:07:01] stas@php.net
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2014-05-11 03:05:07] levim@php.net
Github is down at the moment; pull request will come in on Monday.
------------------------------------------------------------------------
[2014-05-08 18:06:46] levim@php.net
Related To: Bug #67222
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=66622
--
Edit this bug report at https://bugs.php.net/bug.php?id=66622&edit=1
Thread (7 messages)