<?php
class A{
public function __construct(){
echo "A::__construct()\n";
}
public function somePrint(){
echo "fuck off!";
}
public function someCycle($n=100){
$s='';
$arr=array();
$num=0;
for($i=0;$i<$n;$i++){
$s.=$i;
$num+=$i;
array_push($arr, $i);
}
echo "END cycle\n";
}
}
$a = new A();
$a->somePrint();
$b = new A();
$b->someCycle();
A::__construct()
fuck off!A::__construct()
END cycle
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/vfRqP on line 4
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/vfRqP on line 4
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/vfRqP on line 4
Process exited with code 255.