3v4l.org

run code in 300+ PHP versions simultaneously
<?php // pre-requisite $a = 'a'; const ab = 'ab'; class ab { function __construct() { echo __METHOD__.PHP_EOL; } } // create classes new ab; new ab(); new (ab); new ($a.'b'); new (ab::class); // PHP 9, a wish! //new ()ab; ?>

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)
8.5.30.0070.01017.84
8.5.20.0080.01020.12
8.5.10.0060.00416.69
8.5.00.0110.01121.69
8.4.180.0140.00819.69
8.4.170.0110.01122.00
8.4.160.0110.01223.79
8.4.150.0070.00716.78
8.4.140.0140.01117.49
8.4.130.0130.00617.84
8.4.120.0070.00620.34
8.4.110.0110.01018.96
8.4.100.0110.00917.95
8.4.90.0080.01120.63
8.4.80.0050.00918.98
8.4.70.0060.00418.83
8.4.60.0090.01218.74
8.4.50.0110.00818.47
8.4.40.0130.00617.94
8.4.30.0120.00920.52
8.4.20.0290.00917.22
8.4.10.0190.00517.19
8.3.300.0150.01118.34
8.3.290.0100.01020.70
8.3.280.0090.01218.39
8.3.270.0130.00616.57
8.3.260.0090.01116.63
8.3.250.0120.00519.05
8.3.240.0110.00816.50
8.3.230.0110.00816.54
8.3.220.0090.00718.73
8.3.210.0090.00818.58
8.3.200.0050.00416.48
8.3.190.0070.00917.32
8.3.180.0100.00918.76
8.3.170.0070.00717.39
8.3.160.0090.00918.28
8.3.150.0210.00016.30
8.3.140.0270.00016.35
8.3.130.0230.00716.33
8.3.120.0200.00518.08
8.3.110.0210.00316.37
8.3.100.0280.00616.48
8.3.90.0180.00316.22
8.3.80.0290.00816.34
8.3.70.0230.00816.51
8.3.60.0140.00716.33
8.3.50.0150.00616.76
8.3.40.0120.00417.37
8.3.30.0120.00417.34
8.3.20.0240.00817.24
8.3.10.0280.01017.56
8.3.00.0230.00719.23
8.2.300.0110.01118.06
8.2.290.0110.00920.57
8.2.280.0050.00418.33
8.2.270.0310.01016.25
8.2.260.0250.01416.45
8.2.250.0310.00816.38
8.2.240.0300.00916.30
8.2.230.0320.00616.35
8.2.220.0280.01116.50
8.2.210.0310.00716.09
8.2.200.0280.01016.29
8.2.190.0310.00816.70
8.2.180.0270.01416.47
8.2.170.0290.01117.45
8.2.160.0230.01517.35
8.2.150.0240.00817.48
8.2.140.0270.01517.41
8.2.130.0350.00617.52
8.2.120.0380.00317.55
8.2.110.0350.00617.45
8.2.100.0320.00717.51
8.2.90.0280.00917.79
8.2.80.0330.00317.56
8.2.70.0290.01017.51
8.2.60.0360.00717.41
8.2.50.0250.01117.34
8.2.40.0240.01217.54
8.2.30.0330.00317.18
8.2.20.0360.00017.39
8.2.10.0270.00917.44
8.2.00.0220.01117.46
8.1.340.0140.00717.60
8.1.320.0120.00717.96

preferences:
53.36 ms | 850 KiB | 5 Q