3v4l.org

run code in 300+ PHP versions simultaneously
<?php $provider = [ 'class Foo { const FOO = +"42"; }; var_dump(Foo::FOO);', // int 42 'const FOO = +"42"; var_dump(FOO);', // int 42 'const FOO = (int)"42"; var_dump(FOO);', // fatal error 'class Foo { const FOO = (int)"42"; }; var_dump(Foo::FOO);', // fatal error ]; foreach ($provider as $code) { echo $code . "\n"; eval($code); echo "\n"; }

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.1.130.0000.00717.45
8.1.120.0080.00017.49
8.1.110.0000.00817.44
8.1.100.0040.00417.47
8.1.90.0040.00417.48
8.1.80.0080.00317.38
8.1.70.0030.00317.48
8.1.60.0000.00717.62
8.1.50.0040.00417.54
8.1.40.0040.00417.53
8.1.30.0090.00017.69
8.1.20.0040.00417.52
8.1.10.0040.00417.61
8.1.00.0040.00417.54
8.0.260.0030.00316.84
8.0.250.0070.00017.02
8.0.240.0030.00616.94
8.0.230.0030.00317.02
8.0.220.0000.00716.97
8.0.210.0070.00016.97
8.0.200.0000.00717.01
8.0.190.0040.00417.08
8.0.180.0030.00516.93
8.0.170.0000.00817.01
8.0.160.0000.00716.95
8.0.150.0000.00716.79
8.0.140.0000.00916.84
8.0.130.0000.00513.35
8.0.120.0090.00513.41
8.0.110.0060.00713.43
8.0.100.0040.00913.37
8.0.90.0140.00013.30
8.0.80.0000.01313.43
8.0.70.0100.00313.38
8.0.60.0070.00713.37
8.0.50.0090.00513.37
8.0.30.0060.00813.34
8.0.20.0090.00513.43
8.0.10.0000.01313.48
8.0.00.0080.00013.51
7.4.330.0050.00015.55
7.4.320.0000.00616.38
7.4.300.0060.00016.44
7.4.290.0000.00716.45
7.4.280.0000.00816.52
7.4.270.0040.00416.63
7.4.260.0030.00313.27
7.4.250.0090.00613.30
7.4.240.0150.00013.28
7.4.230.0120.00413.31
7.4.220.0070.00713.30
7.4.210.0100.00313.29
7.4.200.0100.00313.31
7.4.190.0040.00913.22
7.4.180.0130.00013.42
7.4.160.0040.00913.42
7.4.150.0040.01013.31
7.4.140.0120.00313.17
7.4.130.0130.00013.24
7.4.120.0060.00313.29
7.4.110.0060.00313.09
7.4.100.0030.00713.13
7.4.90.0060.00613.17
7.4.80.0100.00313.20
7.4.70.0120.00013.25
7.4.60.0080.00213.12
7.4.50.0070.00313.05
7.4.40.0080.00312.96
7.4.30.0070.00312.69
7.4.20.0100.00012.96
7.4.10.0000.00912.94
7.4.00.0090.00013.07
7.3.330.0030.00316.34
7.3.320.0050.00513.29
7.3.310.0000.01113.08
7.3.300.0080.00312.83
7.3.290.0080.00413.13
7.3.280.0070.00313.27
7.3.270.0070.00313.20
7.3.260.0070.00313.26
7.3.250.0060.00612.97
7.3.240.0060.00612.94
7.3.230.0050.00513.15
7.3.220.0090.00213.20
7.3.210.0070.00513.30
7.3.200.0080.00313.15
7.3.190.0080.00313.15
7.3.180.0040.00813.12
7.3.170.0120.00013.12
7.3.160.0070.00313.07
7.3.150.0120.00013.17
7.3.140.0080.00413.27
7.3.130.0130.00013.09
7.3.120.0060.00613.19
7.3.110.0140.00013.22
7.3.100.0030.01013.04
7.3.90.0070.00313.52
7.3.80.0040.00713.22
7.3.70.0110.00013.15
7.3.60.0110.00013.14
7.3.50.0050.00513.03
7.3.40.0040.00413.39
7.3.30.0040.00513.15
7.3.20.0070.00214.77
7.3.10.0050.00514.89
7.3.00.0040.00714.93

preferences:
12.04 ms | 406 KiB | 5 Q