3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private const C1 = "a"; private const C2 = 'b' } try { var_dump(constant('Foo::C1')); } catch(Error $e) { echo 'Caught',$e->getMessage(), PHP_EOL; } try{ Foo::C2; } catch(Error $e) { echo 'Caught',$e->getMessage() ,PHP_EOL; }

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.100.1270.05719.89
7.0.90.1070.06019.97
7.0.80.1230.05319.99
7.0.70.0100.06019.88
7.0.60.0070.06019.98
7.0.50.0070.05720.23
7.0.40.0130.05720.36
7.0.30.0200.05720.33
7.0.20.0130.05720.28
7.0.10.0130.05020.25
7.0.00.0100.05720.32
5.6.250.0170.06320.87
5.6.240.0170.06720.78
5.6.230.0230.04720.65
5.6.220.0200.04720.71
5.6.210.0100.06320.62
5.6.200.0130.08021.20
5.6.190.0130.05021.03
5.6.180.0100.05721.10
5.6.170.0000.06721.02
5.6.160.0030.06321.16
5.6.150.0170.04721.14
5.6.140.0130.05721.13
5.6.130.0170.05321.12
5.6.120.0100.06721.08
5.6.110.0100.06021.09
5.6.100.0070.06021.06
5.6.90.0200.05021.00
5.6.80.0070.06320.45
5.6.70.0100.06320.50
5.6.60.0170.05020.51
5.6.50.0130.05720.50
5.6.40.0070.06020.44
5.6.30.0100.05320.54
5.6.20.0130.05320.53
5.6.10.0100.06020.43
5.6.00.0130.07320.41

preferences:
141.86 ms | 1394 KiB | 7 Q