3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); function true(){ $true = 'false'; echo "\n", $true,":)"; } class Test { private $data; public function __construct($d){ $this->data = $d; } public function list(){ list($a,$b,$c) = $this->data; echo $a,"\n"; echo $b,"\n"; echo $c,"\n"; return $this; } public function null(){ echo "\nData is ",is_null($this->data)? 'null' : 'not null'; } } $arr = array("a","b","c"); (new Test($arr))->list()->null(); true();

preferences:
85.65 ms | 402 KiB | 5 Q