`with` and `let` in PHP?

Zweeper

New Member
Recently I found out about https://developer.mozilla.org/en/JavaScript/Reference/Statements/with, except for PHP in OOP fashion.Like:\[code\]$builder = new markupbuilder();with($markupbuilder){ div( h1('A title...') . p('This is ' . span('paragraph') . ' here.') );}// respectively$builder->div( $builder->h1('A title...') . $builder->p('This is' . $builder->span('paragraph') . ' here'));\[/code\]So, is there something similar for PHP or how could I achieve this in PHP?
 
Top