3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { public function __call(){ echo "foo call"; } } class Baz { protected $foo; protected $bar = null; use Foo; public function test(){ var_dump(isset($this->foo)); var_dump(isset($this->bar)); return get_object_vars($this); } } var_dump((new Baz)->test());

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.20.0430.07020.12
7.0.10.0200.05720.16
7.0.00.0030.09020.25
5.6.170.0170.05020.47
5.6.160.0030.05020.50
5.6.150.0130.06318.29
5.6.140.0130.07318.23
5.6.130.0070.03718.18
5.6.120.0070.08020.93
5.6.110.0100.08021.03
5.6.100.0030.04320.98
5.6.90.0130.06320.88
5.6.80.0100.07020.29
5.5.310.0330.07020.41
5.5.300.0070.07018.08
5.5.290.0030.04018.07
5.5.280.0070.06320.66
5.5.270.0000.06720.80
5.5.260.0130.08320.73
5.5.250.0100.07020.71
5.5.240.0000.06320.04

preferences:
148.42 ms | 1394 KiB | 7 Q