Bug #71856 [Fbk->NoF]: bug in webPhar and Closure::bind
| From: | php-bugs at lists dot php dot net | Date: | Sun, 07 Feb 2021 04:22:08 +0000 |
| Subject: | Bug #71856 [Fbk->NoF]: bug in webPhar and Closure::bind | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-231973@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71856&edit=1
ID: 71856
Updated by: php-bugs@lists.php.net
Reported by: tuadmin at gmail dot com
Summary: bug in webPhar and Closure::bind
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: PHAR related
Operating System: linux,win32
PHP Version: 5.6.19
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2021-01-27 11:56:34] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]? If so, please provide a minimal self-contained
reproduce script.
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2016-03-19 06:03:35] tuadmin at gmail dot com
for semi-patch or temporal solution in stub-web embed use...
<?php
function __temporal__solution__(){
require 'web.php';
}
__temporal__solution__();
------------------------------------------------------------------------
[2016-03-19 05:42:10] tuadmin at gmail dot com
Description:
------------
<?php
class myclass{
public $x;
public function __construct($string){
$this->x=$string;
}
public function show(){
echo "this message is {$this->x}";
}
}
$func = function (){
$this->show();
};
$class = new myclass('hi this is example for bug');
$x = Closure::bind($func,$class);
$x();
Test script:
---------------
<?php
class myclass{
public $x;
public function __construct($string){
$this->x=$string;
}
public function show(){
echo "this message is {$this->x}";
}
}
$func = function (){
$this->show();
};
$class = new myclass('hi this is example for bug');
$x = Closure::bind($func,$class);
$x();
Expected result:
----------------
this message is hi this is example for bug
Actual result:
--------------
Warning: Cannot bind an instance to a static closure in phar://var/www/test.phar/web.php on line 15
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71856&edit=1