3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['x', 'y', 'z']; foreach($array as $element) { $array[2] = 'a'; if ($element=='x') { } print $element; }

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.3.60.0130.00718.18
8.3.50.0140.00418.20
8.3.40.0040.01118.67
8.3.30.0040.01118.79
8.3.20.0040.00419.20
8.3.10.0000.00721.89
8.3.00.0000.00820.76
8.2.180.0090.00616.50
8.2.170.0110.00322.96
8.2.160.0100.00322.14
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0080.00018.16
8.2.120.0080.00026.35
8.2.110.0000.01019.39
8.2.100.0040.00718.16
8.2.90.0000.00817.75
8.2.80.0000.00817.97
8.2.70.0040.00417.93
8.2.60.0070.00018.22
8.2.50.0000.00818.10
8.2.40.0050.00519.47
8.2.30.0040.00419.17
8.2.20.0000.00718.06
8.2.10.0070.00018.12
8.2.00.0050.00317.70
8.1.280.0120.00625.92
8.1.270.0040.00419.05
8.1.260.0030.00526.35
8.1.250.0060.00328.09
8.1.240.0090.00022.06
8.1.230.0090.00318.96
8.1.220.0050.00317.74
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0050.00317.25
8.1.180.0050.00318.10
8.1.170.0050.00318.64
8.1.160.0020.00518.92
8.1.150.0070.00018.89
8.1.140.0030.00322.01
8.1.130.0000.00720.29
8.1.120.0070.00017.49
8.1.110.0000.00817.46
8.1.100.0000.00817.45
8.1.90.0030.00617.45
8.1.80.0040.00417.47
8.1.70.0050.00317.44
8.1.60.0000.00817.58
8.1.50.0000.00817.53
8.1.40.0000.00717.42
8.1.30.0040.00417.71
8.1.20.0050.00217.52
8.1.10.0000.00717.57
8.1.00.0030.00617.48
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.44
8.0.270.0070.00017.25
8.0.260.0030.00318.34
8.0.250.0060.00016.87
8.0.240.0030.00316.94
8.0.230.0030.00516.91
8.0.220.0030.00316.86
8.0.210.0080.00016.88
8.0.200.0030.00316.85
8.0.190.0040.00316.94
8.0.180.0000.00716.86
8.0.170.0070.00316.91
8.0.160.0000.00716.98
8.0.150.0030.00316.84
8.0.140.0000.00716.87
8.0.130.0030.00313.35
8.0.120.0040.00416.90
8.0.110.0040.00416.84
8.0.100.0000.00716.77
8.0.90.0000.00716.70
8.0.80.0070.00916.81
8.0.70.0030.00516.75
8.0.60.0040.00416.87
8.0.50.0040.00416.89
8.0.30.0070.01316.98
8.0.20.0150.00417.40
8.0.10.0050.00316.80
8.0.00.0100.00816.90
7.4.330.0020.00215.55
7.4.320.0040.00416.59
7.4.300.0000.00616.65
7.4.290.0000.00716.60
7.4.280.0040.00416.51
7.4.270.0030.00616.50
7.4.260.0080.00416.62
7.4.250.0030.00516.51
7.4.240.0000.00716.49
7.4.230.0000.00716.58
7.4.220.0040.00416.60
7.4.210.0090.00616.64
7.4.200.0000.00716.41
7.4.160.0100.00516.47
7.4.140.0100.01017.86
7.4.130.0170.00016.54
7.4.120.0110.00816.60
7.3.330.0030.00313.16
7.3.320.0060.00013.25
7.3.310.0040.00416.30
7.3.300.0000.00816.25
7.3.290.0070.00016.13
7.3.280.0060.01216.33
7.3.260.0110.00916.42
7.3.240.0100.00716.33

preferences:
133.15 ms | 400 KiB | 5 Q