new feature -> with()

From: Date: Tue, 09 Oct 2007 19:12:05 +0000
Subject: new feature -> with()
Groups: php.internals 
Request: Send a blank email to internals+get-32721@lists.php.net to get a copy of this message
hi, i think it would be really handy to introduce the with() feature from JavaScript (and probably other OOP languages) into php. so for sample the following --------------------------- $class=new class; $class->do_something(); $class->do_more(); $class->do(); --------------------------- could be made easier and more readable: --------------------------- $class=new class; with($class) { do_something(); do_more(); do(); } --------------------------- greetings Sebastian

« previous php.internals (#32721) next »