3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create a simple array. $array = array(1, 2, 3, 4, 5); //print_r($array); // Now delete every item, but leave the array itself intact: foreach ($array as $i => $value) { echo "key ".$i.", Value=".$array[$i]; } //print_r($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.60.0210.00016.50
8.3.50.0050.01321.09
8.3.40.0140.00318.88
8.3.30.0070.00718.67
8.3.20.0070.00020.34
8.3.10.0070.00023.72
8.3.00.0000.00817.79
8.2.180.0070.01418.29
8.2.170.0140.00322.96
8.2.160.0030.01620.43
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00317.63
8.2.110.0070.00322.07
8.2.100.0060.00617.93
8.2.90.0040.00419.29
8.2.80.0030.00517.97
8.2.70.0050.00317.50
8.2.60.0000.01118.03
8.2.50.0030.00618.07
8.2.40.0080.00021.01
8.2.30.0030.00320.54
8.2.20.0000.00817.62
8.2.10.0050.00318.26
8.2.00.0080.00018.04
8.1.280.0120.00625.92
8.1.270.0110.00723.99
8.1.260.0030.00626.35
8.1.250.0000.00728.09
8.1.240.0090.00022.52
8.1.230.0090.00320.96
8.1.220.0000.00817.88
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0040.00417.00
8.1.180.0050.00318.10
8.1.170.0030.00620.38
8.1.160.0070.00022.00
8.1.150.0040.00418.94
8.1.140.0000.00717.44
8.1.130.0050.00317.72
8.1.120.0040.00417.36
8.1.110.0000.00817.35
8.1.100.0030.00417.39
8.1.90.0000.00717.49
8.1.80.0050.00317.43
8.1.70.0070.00017.54
8.1.60.0040.00417.59
8.1.50.0000.00717.52
8.1.40.0040.00417.42
8.1.30.0090.00017.56
8.1.20.0000.00817.69
8.1.10.0000.00717.47
8.1.00.0050.00317.36
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.36
8.0.270.0040.00416.69
8.0.260.0000.00617.24
8.0.250.0040.00416.85
8.0.240.0040.00416.88
8.0.230.0070.00016.93
8.0.220.0070.00016.77
8.0.210.0040.00416.94
8.0.200.0070.00016.86
8.0.190.0040.00416.85
8.0.180.0050.00316.79
8.0.170.0030.00316.88
8.0.160.0000.00816.95
8.0.150.0040.00316.87
8.0.140.0000.00716.86
8.0.130.0030.00313.24
8.0.120.0040.00416.82
8.0.110.0000.00716.91
8.0.100.0040.00416.80
8.0.90.0000.00816.69
8.0.80.0110.00316.85
8.0.70.0000.00816.75
8.0.60.0000.00716.69
8.0.50.0030.00316.85
8.0.30.0080.01217.10
8.0.20.0070.01317.40
8.0.10.0060.00317.07
8.0.00.0090.00916.82
7.4.330.0000.00515.08
7.4.320.0030.00316.54
7.4.300.0060.00016.43
7.4.290.0030.00316.63
7.4.280.0070.00016.38
7.4.270.0060.00016.55
7.4.260.0050.00216.47
7.4.250.0070.00016.37
7.4.240.0050.00216.49
7.4.230.0000.00716.39
7.4.220.0140.01116.63
7.4.210.0030.01016.55
7.4.200.0000.00716.50
7.4.160.0090.00916.51
7.4.150.0120.00617.40
7.4.140.0120.01017.86
7.4.130.0090.00916.54
7.4.120.0090.00816.42
7.4.110.0040.01316.61
7.4.100.0060.01116.52
7.4.90.0120.00416.52
7.4.80.0090.00919.39
7.4.70.0090.00916.34
7.4.60.0080.01216.58
7.4.50.0020.00216.57
7.4.40.0060.01616.53
7.4.30.0130.01016.53
7.4.00.0040.00814.85
7.3.330.0030.00313.05
7.3.320.0040.00413.11
7.3.310.0070.00016.31
7.3.300.0000.00716.29
7.3.290.0070.00916.27
7.3.280.0090.01116.29
7.3.270.0160.00017.40
7.3.260.0070.01016.43
7.3.250.0080.01116.35
7.3.240.0160.00416.43
7.3.230.0090.00916.39
7.3.210.0160.00516.48
7.3.200.0100.00716.38
7.3.190.0140.00316.29
7.3.180.0030.01216.20
7.3.170.0060.01316.53
7.3.160.0100.00716.51
7.3.120.0070.01114.86
7.3.110.0070.01014.90
7.3.100.0030.01014.86
7.3.90.0030.01015.04
7.3.80.0070.01015.10
7.3.70.0140.00314.93
7.3.60.0090.00614.89
7.3.50.0050.00514.54
7.3.40.0030.01014.81
7.3.30.0090.00314.77
7.3.20.0090.00616.45
7.3.10.0070.00616.79
7.3.00.0040.00916.71
7.2.330.0060.01116.65
7.2.320.0030.01416.69
7.2.310.0200.00316.68
7.2.300.0130.01016.64
7.2.290.0100.00716.79
7.2.240.0070.01015.06
7.2.230.0030.01015.33
7.2.220.0100.00614.75
7.2.210.0070.00715.07
7.2.200.0140.00414.77
7.2.190.0140.00315.14
7.2.180.0080.00814.79
7.2.170.0030.00714.91
7.2.160.0090.00614.99
7.2.150.0060.01216.76
7.2.140.0090.00316.77
7.2.130.0010.01216.90
7.2.120.0150.00816.71
7.2.110.0100.00516.81
7.2.100.0140.00716.90
7.2.90.0090.00816.86
7.2.80.0090.01016.86
7.2.70.0160.00316.85
7.2.60.0100.00616.95
7.2.50.0120.00716.90
7.2.40.0100.00516.92
7.2.30.0110.00616.86
7.2.20.0110.00616.84
7.2.10.0090.00716.79
7.2.00.0090.00817.53
7.1.330.0040.01115.96
7.1.320.0100.00315.77
7.1.310.0070.00716.11
7.1.300.0030.00915.88
7.1.290.0110.00415.68
7.1.280.0030.01015.80
7.1.270.0000.01115.95
7.1.260.0140.00315.86
7.1.250.0050.00415.78
7.1.240.0180.01115.82
7.1.230.0210.00715.70
7.1.220.0180.00815.89
7.1.210.0220.00815.83
7.1.200.0110.00915.88
7.1.190.0090.01215.73
7.1.180.0090.00915.74
7.1.170.0120.01215.56
7.1.160.0260.00015.81
7.1.150.0160.00415.84
7.1.140.0210.00415.91
7.1.130.0170.00315.54
7.1.120.0150.00815.69
7.1.110.0130.00315.71
7.1.100.0200.00216.89
7.1.90.0240.00016.02
7.1.80.0210.00915.75
7.1.70.0090.00516.46
7.1.60.0100.01017.69
7.1.50.0170.00816.28
7.1.40.0190.00815.80
7.1.30.0320.00915.45
7.1.20.0250.00515.61
7.1.10.0140.00715.73
7.1.00.0220.03819.03
7.0.320.0220.00615.38
7.0.310.0160.00415.39
7.0.300.0170.00915.44
7.0.290.0200.00015.34
7.0.280.0220.00315.19
7.0.270.0190.00915.28
7.0.260.0150.01315.38
7.0.250.0170.01015.54
7.0.240.0240.00315.38
7.0.230.0440.00715.14
7.0.220.0140.00315.15
7.0.210.0100.01015.53
7.0.200.0080.00815.21
7.0.190.0310.00315.18
7.0.180.0130.01015.26
7.0.170.0190.00415.59
7.0.160.0130.00815.56
7.0.150.0270.00315.30
7.0.140.0120.01015.55
7.0.130.0140.01115.45
7.0.120.0320.00415.44
7.0.110.0210.00515.57
7.0.100.0220.00615.44
7.0.90.0200.00315.16
7.0.80.0240.00215.39
7.0.70.0220.00315.43
7.0.60.0140.04517.70
7.0.50.0120.02716.63
7.0.40.0100.04716.77
7.0.30.0180.02016.82
7.0.20.0230.03616.81
7.0.10.0090.04216.71
7.0.00.0080.03916.67
5.6.380.0080.00814.46
5.6.370.0000.01414.57
5.6.360.0140.00914.30
5.6.350.0120.00514.53
5.6.340.0090.00914.36
5.6.330.0040.01214.61
5.6.320.0130.00514.03
5.6.310.0140.00014.20
5.6.300.0100.00714.39
5.6.290.0080.00614.44
5.6.280.0070.01817.67
5.6.270.0090.00614.30
5.6.260.0080.00414.25
5.6.250.0020.01514.50
5.6.240.0040.01214.24
5.6.230.0080.00514.38
5.6.220.0170.00314.20
5.6.210.0130.03817.40
5.6.200.0160.02816.15
5.6.190.0070.04517.38
5.6.180.0210.02617.58
5.6.170.0250.03917.34
5.6.160.0060.02817.27
5.6.150.0100.04116.21
5.6.140.0150.03916.24
5.6.130.0040.04816.29
5.6.120.0070.02917.61
5.6.110.0110.02917.56
5.6.100.0100.04017.63
5.6.90.0120.02217.70
5.6.80.0110.04417.30
5.6.70.0080.00814.26
5.6.60.0100.00814.20
5.6.50.0140.00314.35
5.6.40.0110.00814.20
5.6.30.0200.00514.59
5.6.20.0220.00414.18
5.6.10.0150.00014.41
5.6.00.0210.00314.16
5.5.380.0080.00511.04
5.5.370.0090.00311.10
5.5.360.0070.00511.23
5.5.350.0050.01815.62
5.5.340.0090.02314.72
5.5.330.0150.03815.79
5.5.320.0170.04215.58
5.5.310.0180.03715.66
5.5.300.0070.02714.65
5.5.290.0070.04514.59
5.5.280.0090.02216.14
5.5.270.0080.02615.82
5.5.260.0110.04315.80
5.5.250.0030.04615.95
5.5.240.0160.03915.65
5.5.230.0110.00310.95
5.5.220.0100.00310.91
5.5.210.0050.00911.01
5.5.200.0060.00810.91
5.5.190.0040.00411.02
5.5.180.0070.00310.91
5.5.170.0240.00314.31
5.5.160.0120.00811.16
5.5.150.0000.01010.91
5.5.140.0110.00011.10
5.5.130.0180.00010.98
5.5.120.0150.00311.22
5.5.110.0060.00610.99
5.5.100.0120.00010.91
5.5.90.0050.00711.09
5.5.80.0090.00310.96
5.5.70.0120.00711.04
5.5.60.0110.00011.03
5.5.50.0130.00010.91
5.5.40.0190.00310.93
5.5.30.0050.00311.12
5.5.20.0120.00411.15
5.5.10.0060.00311.09
5.5.00.0070.00311.13
5.4.450.0470.03515.20
5.4.440.0490.03915.32
5.4.430.0510.03015.10
5.4.420.0440.03615.17
5.4.410.0430.02615.07
5.4.400.0460.03115.05
5.4.390.0480.03215.18
5.4.380.0520.02815.22
5.4.370.0460.02514.98
5.4.360.0490.03214.86
5.4.350.0570.03715.13
5.4.340.0480.03815.12
5.4.330.0020.00910.91
5.4.320.0400.03115.10
5.4.310.0490.03315.00
5.4.300.0500.03014.84
5.4.290.0400.03015.06
5.4.280.0410.02815.05
5.4.270.0400.03615.14
5.4.260.0370.02915.12
5.4.250.0430.02915.01
5.4.240.0490.03314.94
5.4.230.0410.03415.03
5.4.220.0580.02915.01
5.4.210.0470.02814.87
5.4.200.0440.03114.93
5.4.190.0470.03015.00
5.4.180.0440.03214.95
5.4.170.0390.03615.02
5.4.160.0470.04115.05
5.4.150.0520.03215.05
5.4.140.0430.03513.73
5.4.130.0450.03213.73
5.4.120.0480.02213.76
5.4.110.0490.02913.75
5.4.100.0300.02313.80
5.4.90.0110.02713.73
5.4.80.0440.02813.76
5.4.70.0090.03813.64
5.4.60.0110.02313.71
5.4.50.0080.02213.74
5.4.40.0210.02013.64
5.4.30.0170.01913.66
5.4.20.0140.03813.72
5.4.10.0160.00310.92
5.4.00.0160.00010.98

preferences:
78.52 ms | 401 KiB | 5 Q