3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { $foo = 'foo'; $bar = new class() use ($foo) { public function classMethod() { var_dump($foo); } }; $bar->classMethod(); } } $foo = new Foo(); $foo->bar();

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.00.0130.07320.20
5.6.160.0030.06720.54
5.6.150.0130.07018.23
5.6.140.0070.08018.22
5.6.130.0130.04018.14
5.6.120.0100.05720.98
5.6.110.0170.05321.00
5.6.100.0000.04321.11
5.6.90.0130.07720.95
5.6.80.0070.06720.36
5.5.300.0030.08717.92
5.5.290.0170.06017.96
5.5.280.0100.08320.77
5.5.270.0170.06720.79
5.5.260.0200.07020.76
5.5.250.0100.08020.47
5.5.240.0130.08020.22

preferences:
141.1 ms | 1394 KiB | 7 Q