3v4l.org

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

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.40.0070.00718.80
8.3.30.0090.00618.85
8.3.20.0080.00019.22
8.3.10.0050.00321.79
8.3.00.0040.00420.61
8.2.170.0140.00022.96
8.2.160.0030.01022.08
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0070.00018.09
8.2.120.0040.00426.35
8.2.110.0070.00320.35
8.2.100.0040.00817.77
8.2.90.0080.00017.88
8.2.80.0110.00017.97
8.2.70.0000.00817.93
8.2.60.0080.00018.16
8.2.50.0080.00018.10
8.2.40.0070.00219.47
8.2.30.0000.00719.18
8.2.20.0000.00818.03
8.2.10.0000.00718.11
8.2.00.0090.00017.76
8.1.270.0000.00718.87
8.1.260.0080.00026.35
8.1.250.0000.00928.09
8.1.240.0070.00322.61
8.1.230.0070.00420.99
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00617.25
8.1.180.0050.00318.10
8.1.170.0030.00518.51
8.1.160.0000.00818.88
8.1.150.0090.00018.83
8.1.140.0000.00722.13
8.1.130.0070.00020.26
8.1.120.0000.00717.37
8.1.110.0040.00417.47
8.1.100.0050.00217.47
8.1.90.0050.00217.46
8.1.80.0000.00817.31
8.1.70.0000.00717.46
8.1.60.0030.00617.61
8.1.50.0000.00817.44
8.1.40.0080.00017.50
8.1.30.0040.00417.60
8.1.20.0040.00417.47
8.1.10.0040.00417.46
8.1.00.0000.00817.55
8.0.300.0050.00218.77
8.0.290.0040.00416.75
8.0.280.0050.00218.45
8.0.270.0030.00317.24
8.0.260.0000.00618.39
8.0.250.0000.00716.96
8.0.240.0000.00716.85
8.0.230.0000.00716.95
8.0.220.0030.00316.92
8.0.210.0050.00216.84
8.0.200.0080.00016.83
8.0.190.0040.00416.93
8.0.180.0040.00416.93
8.0.170.0040.00416.91
8.0.160.0000.00716.79
8.0.150.0080.00016.68
8.0.140.0070.00016.74
8.0.130.0000.00513.34
8.0.120.0000.00816.90
8.0.110.0040.00416.72
8.0.100.0070.00016.90
8.0.90.0030.00516.73
8.0.80.0050.01616.82
8.0.70.0040.00416.86
8.0.60.0070.00016.89
8.0.50.0070.00016.84
8.0.30.0150.00317.02
8.0.20.0070.01317.40
8.0.10.0030.00516.81
8.0.00.0070.01016.76
7.4.330.0030.00315.55
7.4.320.0000.00716.60
7.4.300.0060.00016.41
7.4.290.0000.00616.39
7.4.280.0080.00016.38
7.4.270.0030.00316.59
7.4.260.0000.01016.62
7.4.250.0000.00716.45
7.4.240.0000.00816.55
7.4.230.0070.00016.59
7.4.220.0050.00316.40
7.4.210.0050.00816.48
7.4.200.0040.00416.70
7.4.160.0100.00716.51
7.4.140.0140.00717.86
7.4.130.0090.01216.40
7.4.120.0090.00816.47
7.4.110.0150.00616.46
7.4.100.0120.00916.63
7.4.90.0090.00916.62
7.4.80.0140.00719.39
7.4.70.0050.01116.50
7.4.60.0080.01116.49
7.4.50.0060.00916.57
7.4.40.0100.01016.57
7.4.10.0070.01114.96
7.4.00.0050.01314.89
7.3.330.0060.00013.23
7.3.320.0000.00513.28
7.3.310.0000.00816.39
7.3.300.0040.00416.29
7.3.290.0020.00516.32
7.3.280.0030.01416.43
7.3.260.0090.00816.45
7.3.240.0080.01016.48
7.3.230.0070.01416.31
7.3.210.0060.01616.37
7.3.200.0140.00316.33
7.3.190.0160.00716.53
7.3.180.0060.01516.27
7.3.170.0130.00816.41
7.3.160.0110.00716.38
7.3.130.0060.01314.99
7.3.120.0060.01014.84
7.3.110.0070.01214.81
7.3.100.0090.00614.77
7.3.90.0060.00914.81
7.3.80.0070.00714.79
7.3.70.0050.00814.86
7.3.60.0080.00714.76
7.3.50.0040.01114.79
7.3.40.0090.00414.85
7.3.30.0080.00714.76
7.3.20.0070.00616.68
7.3.10.0040.00916.50
7.3.00.0040.00516.53
7.2.330.0090.01016.78
7.2.320.0080.01116.39
7.2.310.0160.00016.76
7.2.300.0100.00716.70
7.2.290.0090.00916.50
7.2.260.0110.00714.98
7.2.250.0040.01414.90
7.2.240.0090.00514.98
7.2.230.0100.00414.92
7.2.220.0040.01215.10
7.2.210.0040.01215.16
7.2.200.0040.01014.97
7.2.190.0060.00914.96
7.2.180.0060.01015.05
7.2.170.0070.00814.96
7.2.160.0090.00814.96
7.2.150.0070.00916.91
7.2.140.0070.00716.82
7.2.130.0100.00516.96
7.2.120.0040.01116.85
7.2.110.0040.00816.91
7.2.100.0050.01016.85
7.2.90.0030.01217.03
7.2.80.0060.01016.98
7.2.70.0040.01016.91
7.2.60.0050.00616.92
7.2.50.0000.01417.00
7.2.40.0050.01016.93
7.2.30.0110.00316.91
7.2.20.0040.00716.96
7.2.10.0060.00916.98
7.2.00.0070.00716.88
7.1.330.0050.00815.91
7.1.320.0060.00815.83
7.1.310.0090.00415.84
7.1.300.0050.00915.81
7.1.290.0060.00915.90
7.1.280.0070.00515.82
7.1.270.0040.00615.82
7.1.260.0030.00915.67
7.1.250.0070.00815.86
7.1.240.0060.00615.97
7.1.230.0070.00815.78
7.1.220.0040.00815.75
7.1.210.0050.00915.74
7.1.200.0070.00615.72
7.1.190.0090.00415.78
7.1.180.0080.00615.85
7.1.170.0070.00515.76
7.1.160.0060.00615.74
7.1.150.0030.01015.71
7.1.140.0050.01015.91
7.1.130.0020.00915.74
7.1.120.0020.01015.79
7.1.110.0020.00915.90
7.1.100.0060.00715.77
7.1.90.0040.00915.72
7.1.80.0040.00915.87
7.1.70.0080.00615.75
7.1.60.0050.00615.80
7.1.50.0060.00815.92
7.1.40.0030.00915.81
7.1.30.0050.00715.71
7.1.20.0070.00315.75
7.1.10.0030.00915.81
7.1.00.0050.00515.70
7.0.330.0060.00915.35
7.0.320.0080.00915.41
7.0.310.0070.00615.47
7.0.300.0030.00815.30
7.0.290.0060.00715.54
7.0.280.0030.01015.33
7.0.270.0030.00915.46
7.0.260.0080.00415.35
7.0.250.0010.00815.50
7.0.240.0030.00915.42
7.0.230.0080.00515.38
7.0.220.0050.00815.53
7.0.210.0070.00415.42
7.0.200.0050.00515.46
7.0.190.0050.00715.34
7.0.180.0060.00615.45
7.0.170.0080.00515.46
7.0.160.0060.00515.53
7.0.150.0080.00515.43
7.0.140.0050.00615.38
7.0.130.0060.00515.38
7.0.120.0070.00615.43
7.0.110.0070.00515.46
7.0.100.0050.00915.46
7.0.90.0060.00415.45
7.0.80.0030.01115.37
7.0.70.0050.00715.34
7.0.60.0040.00715.36
7.0.50.0070.00615.49
7.0.40.0050.00913.56
7.0.30.0070.00613.45
7.0.20.0040.00913.41
7.0.10.0070.00713.55
7.0.00.0040.01013.54
5.6.400.0040.00714.42
5.6.390.0030.00914.52
5.6.380.0020.01314.31
5.6.370.0010.01214.27
5.6.360.0060.00614.51
5.6.350.0020.01014.32
5.6.340.0030.01114.50
5.6.330.0020.00914.42
5.6.320.0060.00714.47
5.6.310.0050.00714.42
5.6.300.0040.00914.65
5.6.290.0050.00714.50
5.6.280.0050.00914.47
5.6.270.0020.01114.33
5.6.260.0080.00414.64
5.6.250.0100.00314.35
5.6.240.0080.00514.49
5.6.230.0040.01014.44
5.6.220.0060.00814.46
5.6.210.0040.00814.46
5.6.200.0070.00914.35
5.6.190.0060.00514.40
5.6.180.0050.00714.33
5.6.170.0070.00814.40
5.6.160.0050.00914.56
5.6.150.0040.00714.43
5.6.140.0050.00714.26
5.6.130.0030.00914.24
5.6.120.0080.00414.36
5.6.110.0080.00514.46
5.6.100.0060.00614.52
5.6.90.0060.00714.58
5.6.80.0060.00814.16
5.6.70.0050.00814.26
5.6.60.0030.00714.48
5.6.50.0050.00614.37
5.6.40.0050.00714.31
5.6.30.0030.00914.15
5.6.20.0040.00714.32
5.6.10.0040.00714.26
5.6.00.0080.00614.33

preferences:
54.62 ms | 400 KiB | 5 Q