<?php
class A {
function __construct() {
$this->foo = new B;
}
}
class B {
static $c = 0;
function construct() {
$this->i = ++self::$c;
}
}
$a = new A;
$b = clone $a;
var_dump($a, $b);
Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/td638 on line 10
Process exited with code 255.
Parse error: parse error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/td638 on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/td638 on line 10
Process exited with code 255.