All pastes #480611 Raw Edit

Anonymous

public php v1 · immutable
·published 2007-05-10 11:15 UTC
rendered paste body
class A {    var $arr_of_b = array();    function render() {        render($this->arr_of_b);    }}class B {    function render() {        echo("Class B\n");    }}$foo = new A();for ($i = 0; $i < 5; $i++) {    $bar = new B();    $foo->arr_of_b[] = $bar;};$foo->render();Output:Class BClass BClass BClass BClass B