Code formatting issue

From: Date: Tue, 19 Aug 2003 18:03:51 +0000
Subject: Code formatting issue
Groups: php.general 
Request: Send a blank email to php-general+get-160045@lists.php.net to get a copy of this message
Is there a way I can make this type of code neater?
    $thing = new whatever ();
    $thing->doStuff ();
    $thing->anotherThing ();
    $thing->doThis ();
    $thing->doThat ();
    $thing->doThis ();
    $thing->doThat ();
    $thing->anotherThing ();
    $thing->doThis ();
    // etc. etc.
Some languages have the construct "with", so you can so something like this:
    $thing = new whatever ();
    with ( $thing ) {
    	doStuff ();
    	anotherThing ();
    	doThis ();
    	doThat ();
    	doThis ();
    	doThat ();
    	anotherThing ();
    	doThis ();
        // etc. etc.
    }
which is much neater. Is there anyway to do this type of thing with PHP?

« previous php.general (#160045) next »