3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); class Test { private $data; public function __construct($d){ $this->data = $d; } public function listy(){ list($a,$b,$c) = $this->data; echo $a,"\n"; echo $b,"\n"; echo $c,"\n"; } } (new Test)->listy(array("a","b","c")));
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.7 - 5.6.14
Parse error: syntax error, unexpected ')' in /in/0YpVZ on line 18
Process exited with code 255.

preferences:
181.06 ms | 1400 KiB | 67 Q