|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-09-18 07:44 UTC] laruence@php.net
[2012-09-18 07:44 UTC] laruence@php.net
-Status: Open
+Status: Not a bug
[2012-09-18 07:51 UTC] laruence@php.net
-Status: Not a bug
+Status: Re-Opened
[2012-09-18 07:51 UTC] laruence@php.net
[2012-09-18 07:53 UTC] laruence@php.net
[2012-09-18 07:53 UTC] laruence@php.net
-Status: Re-Opened
+Status: Closed
-Assigned To:
+Assigned To: laruence
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 16:00:01 2025 UTC |
Description: ------------ Having an anonymous function as a class property and executing it with call_user_func() or call_user_func_array() causes PHP to crash. Test script: --------------- class Foo { function __call($name, $args) { call_user_func(array($this, $name), $args); } } $bar = new Foo; $bar->prop = function(){}; $bar->prop(); /* circumventing it can be achieved with the following: */ $method = $this->{$name}; call_user_func($method, $args); Expected result: ---------------- Successful exeuction of anonymous function (or at least an error message). Actual result: -------------- PHP crashes.