3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("precision", 20); // from 246 $from = "8.2" * "30"; // to 342 $to = "11.4" * "30"; printf("from %.20f to %.20f\n", $from, $to); $a = []; for ($i = $from; $i <= $to; $i++) { if (round($i) != floor($i)) { printf("index %.20f will be truncated to %d\n", $i, $i); } if ($i == 246) { echo "No output at all!"; } if ($i == 250) { echo "Still no output..."; } if ($i == 256) { echo "Still no output..."; } if ($i == 257) { echo "It works for {$i} and further numbers"; } $a[$i] = "test" . $i; } var_dump($a);

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.110.0060.00317.47
8.1.100.0050.00217.51
8.1.90.0050.00617.46
8.1.80.0070.00017.50
8.1.70.0000.00817.51
8.1.60.0040.00417.62
8.1.50.0040.00417.51
8.1.40.0030.00617.53
8.1.30.0040.00417.65
8.1.20.0040.00417.75
8.1.10.0080.00017.53
8.1.00.0070.00417.52
8.0.240.0040.00416.86
8.0.230.0000.00717.04
8.0.220.0000.00716.99
8.0.210.0000.00716.86
8.0.200.0030.00317.04
8.0.190.0080.00017.02
8.0.180.0000.00816.98
8.0.170.0000.00816.92
8.0.160.0040.00416.95
8.0.150.0040.00416.99
8.0.140.0050.00316.88
8.0.130.0030.00313.30
8.0.120.0030.00516.87
8.0.110.0040.00416.98
8.0.100.0040.00416.92
8.0.90.0040.00416.80
8.0.80.0060.00917.00
8.0.70.0070.00016.82
8.0.60.0040.00416.92
8.0.50.0000.00816.78
8.0.30.0110.00817.19
8.0.20.0120.01117.40
8.0.10.0080.00017.01
8.0.00.0110.01116.57
7.4.300.0000.00716.61
7.4.290.0080.00016.48
7.4.280.0000.00816.55
7.4.270.0000.00716.67
7.4.260.0040.00416.54
7.4.250.0030.00516.63
7.4.240.0070.00016.57
7.4.230.0030.00316.49
7.4.220.0060.01316.67
7.4.210.0090.00916.60
7.4.200.0000.00716.75
7.4.160.0080.01116.60
7.4.150.0090.01917.40
7.4.140.0120.00917.86
7.4.130.0110.01516.65
7.4.120.0090.01216.64
7.4.110.0160.01016.46
7.4.100.0090.00916.57
7.4.90.0120.00916.60
7.4.80.0040.01419.39
7.4.70.0110.00816.62
7.4.60.0120.00816.69
7.4.50.0040.00716.25
7.4.40.0060.01316.45
7.4.30.0110.01116.66
7.4.00.0120.00615.20
7.3.330.0000.00613.22
7.3.320.0030.00313.29
7.3.310.0000.00716.23
7.3.300.0040.00416.17
7.3.290.0040.01316.42
7.3.280.0070.01316.39
7.3.270.0180.00317.40
7.3.260.0140.01016.60
7.3.250.0180.00516.43
7.3.240.0140.01116.51
7.3.230.0110.00716.39
7.3.210.0070.01416.36
7.3.200.0180.00416.50
7.3.190.0140.00416.45
7.3.180.0190.00416.66
7.3.170.0060.01916.41
7.3.160.0190.00016.64
7.2.330.0080.01316.55
7.2.320.0110.01116.80
7.2.310.0150.00416.79
7.2.300.0170.01116.51
7.2.290.0090.01216.76
7.2.110.0190.00316.78
7.2.60.0060.00617.04
7.2.00.0070.00719.30
7.1.200.0070.00015.46
7.1.70.0030.00617.13
7.1.60.0040.00816.95
7.1.00.0000.08022.42
7.0.200.0100.00314.41
7.0.120.0130.05720.19
7.0.110.0200.05020.34
7.0.100.0030.06320.32
7.0.90.0030.06320.29
7.0.80.0170.05320.42
7.0.70.0100.06020.33
7.0.60.0200.06020.29
7.0.50.0300.07020.22
7.0.40.0370.06020.35
7.0.30.0370.05720.22
7.0.20.0400.06020.33
7.0.10.0430.07720.25
7.0.00.0470.05320.30
5.6.270.0130.07321.04
5.6.260.0230.05321.01
5.6.250.0030.06321.04
5.6.240.0130.06321.07
5.6.230.0170.06321.09
5.6.220.0130.05321.05
5.6.210.0100.05720.96
5.6.200.0100.06321.04
5.6.190.0200.05321.09
5.6.180.0070.06320.83
5.6.170.0100.06020.83
5.6.160.0070.06721.01
5.6.150.0070.06321.05
5.6.140.0170.06020.96
5.6.130.0270.05320.88
5.6.120.0170.05321.04
5.6.110.0070.06320.97
5.6.100.0300.07020.99
5.6.90.0230.04720.79
5.6.80.0170.04720.18
5.6.70.0030.06020.20
5.6.60.0100.05720.30
5.6.50.0030.05720.46
5.6.40.0170.04720.39
5.6.30.0030.06320.28
5.6.20.0030.06020.36
5.6.10.0100.05320.43
5.6.00.0130.05020.27

preferences:
62.54 ms | 406 KiB | 5 Q