3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { function __construct() { $this->va = function() { return []; } } } $o=new B; var_dump(($o->va)()['sa']=10);

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.0270.07720.12
7.0.10.0070.07020.26
7.0.00.0100.07720.09
5.6.170.0300.04020.55
5.6.160.0030.09020.46
5.6.150.0100.08318.17
5.6.140.0000.04018.14
5.6.130.0100.07718.18
5.6.120.0070.07020.92
5.6.110.0030.06021.13
5.6.100.0270.06320.98
5.6.90.0070.07721.11
5.6.80.0200.07020.37
5.5.310.0230.08020.28
5.5.300.0070.05317.97
5.5.290.0100.08318.05
5.5.280.0000.09320.88
5.5.270.0030.08720.73
5.5.260.0100.07320.68
5.5.250.0130.07320.59
5.5.240.0270.06720.16

preferences:
142.05 ms | 1394 KiB | 7 Q