php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21909 storing lambda functions into object properties
Submitted: 2003-01-27 13:09 UTC Modified: 2003-06-09 02:40 UTC
From: ulf dot wendel at phpdoc dot de Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2003-01-27 (dev) OS: Windows XP Professional
Private report: No CVE-ID: None
 [2003-01-27 13:09 UTC] ulf dot wendel at phpdoc dot de
Try this, it simply let's my PHP crash:

class foo {

  public $newfunc;
  
  public function __construct() {
    $this->newfunc = create_function('$a,$b','print "ln($a) + ln($b) = ".log($a * $b);');
    call_user_func(array($this, $this->newfunc), 1, 2);
    //$this->$newfunc(1, 2);
  }
  
}

$f = new foo();

Ok, ok - this is really, well, weird code, however...



PHP:


PHP Version 5.0.0-dev

System Windows NT localhost 5.1 build 2600
Build Date Jan 26 2003 16:10:39
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path E:\php\php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 90021012
Debug Build no
Thread Safety enabled
Registered PHP Streams php, http, ftp, compress.zlib

Zend Engine v2.0.0-dev,

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-10 06:42 UTC] andrew@php.net
Verified on WinXP with latest snap.

~ Andrew Heebner
 [2003-06-09 02:40 UTC] zeev@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 12:01:30 2024 UTC