#41856 [Com]: support for anonymous classes

From: Date: Tue, 11 Nov 2008 06:24:38 +0000
Subject: #41856 [Com]: support for anonymous classes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-130859@lists.php.net to get a copy of this message
ID: 41856 Comment by: igorsf at yahoo dot com Reported By: mbaynton at gmail dot com Status: Open Bug Type: Feature/Change Request PHP Version: 5.2.3 New Comment: +1 Previous Comments: ------------------------------------------------------------------------ [2007-06-29 19:12:50] mbaynton at gmail dot com Description: ------------ Just voicing my opinion that it would be nice to be able to create anonymous inner classes as in Java. Or put another way, I wish something like the reproduce code would work. This looks much better than creating and naming a global class that has some trivial purpose, like the one in the example. Reproduce code: --------------- if(! is_object($this->movie)) { $this->movie = new __Object() { public function __call($name, $args) { return false; } }; } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41856&edit=1

« previous php.bugs (#130859) next »