- Output for 5.4.0 - 5.4.24
- Parse error: syntax error, unexpected '=' in /in/a6osi on line 21
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected '[' in /in/a6osi on line 11
Process exited with code 255.
<?php
class A
{
static $count;
function b()
{
if (null === $count) {
$count = 1;
return ['a', 'b'];
}
return $count++;
}
}
$a = new A;
var_dump($a->b(), $a->b());
A::count = null;
$a = new A;
var_dump($a->b()[$a->b()]);