Is there a way I can make this type of code neater?
$thing = new whatever ();
$thing->doStuff (5, 100);
$thing->anotherThing (200, 200);
$thing->doThis (300, 300);
$thing->doThis (100, 300);
$thing->doThis (200, 200);
$thing->doThis (200, 210);
$thing->anotherThing (200, 200);
$thing->doThis (200, 220);
// etc. etc.
Some languages have the construct "with", so you can so something like this:
$thing = new whatever ();
with ( $thing ) {
doStuff (5, 100);
anotherThing (200, 200);
doThis (300, 300);
doThis (100, 300);
doThis (200, 200);
doThis (200, 210);
anotherThing (200, 200);
doThis (200, 220);
// etc. etc.
}
which is much neater. Is there anyway to do this type of thing with PHP?