3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = array("A","B","C","D"); foreach ( $list as $var ) { print(current($list)); } echo "\n"; foreach ( $list as $var ) { print(item($list)); } function item($list) { return current($list); } echo "\n"; item2($list); function item2($list) { foreach ( $list as $var ) { print(current($list)); } } ?>

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.130.0040.00418.58
8.3.120.0110.00019.04
8.3.110.0000.00820.94
8.3.100.0080.00024.06
8.3.90.0000.00826.77
8.3.80.0060.00316.63
8.3.70.0070.01016.63
8.3.60.0110.00316.50
8.3.50.0080.01221.92
8.3.40.0140.00018.71
8.3.30.0140.00019.00
8.3.20.0070.00020.06
8.3.10.0040.00423.70
8.3.00.0000.00819.13
8.2.250.0040.00416.50
8.2.240.0090.00619.09
8.2.230.0060.00322.58
8.2.220.0030.00637.54
8.2.210.0030.00526.77
8.2.200.0030.00618.29
8.2.190.0070.00716.75
8.2.180.0090.00618.41
8.2.170.0110.00322.96
8.2.160.0070.00719.29
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0090.00026.16
8.2.120.0040.00419.54
8.2.110.0000.00921.00
8.2.100.0090.00317.72
8.2.90.0040.00417.87
8.2.80.0080.00019.03
8.2.70.0050.00317.50
8.2.60.0030.00517.50
8.2.50.0060.00318.10
8.2.40.0000.00719.30
8.2.30.0030.00617.97
8.2.20.0040.00417.56
8.2.10.0040.00418.11
8.2.00.0000.01117.79
8.1.300.0150.00020.01
8.1.290.0040.00830.84
8.1.280.0100.00625.92
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.19
8.1.230.0080.00320.88
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0040.00417.13
8.1.180.0030.00518.10
8.1.170.0040.00418.66
8.1.160.0000.00822.00
8.1.150.0040.00418.58
8.1.140.0000.00817.37
8.1.130.0070.00017.94
8.1.120.0000.00817.52
8.1.110.0000.00817.34
8.1.100.0000.00717.49
8.1.90.0000.00717.45
8.1.80.0000.00717.54
8.1.70.0030.00317.40
8.1.60.0080.00417.60
8.1.50.0050.00317.55
8.1.40.0040.00417.50
8.1.30.0000.00817.64
8.1.20.0000.00817.59
8.1.10.0030.00617.41
8.1.00.0030.00617.30
8.0.300.0000.00720.16
8.0.290.0040.00416.63
8.0.280.0050.00218.29
8.0.270.0030.00316.76
8.0.260.0030.00317.23
8.0.250.0030.00317.03
8.0.240.0030.00316.98
8.0.230.0070.00016.95
8.0.220.0070.00016.77
8.0.210.0030.00316.90
8.0.200.0000.00616.86
8.0.190.0070.00016.83
8.0.180.0040.00416.82
8.0.170.0080.00016.95
8.0.160.0050.00216.86
8.0.150.0030.00316.86
8.0.140.0040.00316.81
8.0.130.0000.00613.35
8.0.120.0000.00816.87
8.0.110.0040.00416.90
8.0.100.0040.00416.75
8.0.90.0040.00416.77
8.0.80.0150.00416.79
8.0.70.0000.00816.70
8.0.60.0040.00416.75
8.0.50.0000.00716.86
8.0.30.0060.01517.27
8.0.20.0110.00817.40
8.0.10.0000.00716.98
8.0.00.0050.01416.78
7.4.330.0000.00515.00
7.4.320.0000.00616.59
7.4.300.0000.00616.52
7.4.290.0000.00716.61
7.4.280.0030.00516.59
7.4.270.0050.00316.46
7.4.260.0000.00513.14
7.4.250.0050.00516.57
7.4.240.0030.00316.53
7.4.230.0030.00316.35
7.4.220.0110.00616.50
7.4.210.0080.00916.55
7.4.200.0000.00716.58
7.4.190.0050.00216.48
7.4.160.0090.00616.66
7.4.150.0080.01117.40
7.4.140.0080.01017.86
7.4.130.0060.01116.51
7.4.120.0070.01016.56
7.4.110.0070.01116.37
7.4.100.0030.01316.46
7.4.90.0120.00616.50
7.4.80.0070.01119.39
7.4.70.0120.00616.38
7.4.60.0070.01116.55
7.4.50.0000.00716.34
7.4.40.0040.01222.77
7.4.30.0030.01316.52
7.4.00.0060.00914.86
7.3.330.0000.00513.30
7.3.320.0020.00313.25
7.3.310.0020.00516.38
7.3.300.0030.00516.18
7.3.290.0150.00316.30
7.3.280.0090.01016.32
7.3.270.0090.01117.40
7.3.260.0120.00616.57
7.3.250.0150.00716.39
7.3.240.0130.00316.30
7.3.230.0100.00716.48
7.3.210.0120.00616.50
7.3.200.0080.00919.39
7.3.190.0040.01816.35
7.3.180.0000.01516.29
7.3.170.0180.00616.38
7.3.160.0110.00516.48
7.3.120.0030.01314.88
7.3.70.0040.01414.78
7.3.60.0070.01014.71
7.3.50.0030.01314.77
7.3.40.0030.00814.81
7.3.30.0080.00314.69
7.3.20.0060.00916.74
7.3.10.0100.00716.73
7.3.00.0100.00716.41
7.2.330.0000.01816.65
7.2.320.0090.01716.63
7.2.310.0130.00316.68
7.2.300.0060.01216.52
7.2.290.0100.00716.39
7.2.200.0070.01015.21
7.2.190.0060.00614.78
7.2.180.0100.00615.02
7.2.170.0030.01314.76
7.2.160.0090.00615.02
7.2.150.0090.00916.75
7.2.140.0090.00916.77
7.2.130.0060.01216.86
7.2.120.0120.00016.90
7.2.110.0100.00616.70
7.2.100.0060.00916.94
7.2.90.0100.00316.83
7.2.80.0060.01216.79
7.2.70.0100.01017.00
7.2.60.0080.00616.83
7.2.50.0060.00916.87
7.2.40.0060.00616.94
7.2.30.0070.00716.86
7.2.20.0310.00817.41
7.2.10.0190.01217.45
7.2.00.0270.01117.29
7.1.300.0070.00415.71
7.1.290.0060.00615.56
7.1.280.0040.01115.68
7.1.270.0070.00715.63
7.1.260.0050.01115.52
7.1.250.0000.01515.47
7.1.240.0130.01015.90
7.1.230.0150.00415.40
7.1.220.0100.01015.59
7.1.210.0150.00515.78
7.1.200.0120.00515.70
7.1.190.0160.01015.68
7.1.180.0190.01015.72
7.1.170.0140.01115.95
7.1.160.0110.00615.57
7.1.150.0080.00815.56
7.1.140.0250.00716.23
7.1.130.0280.00716.21
7.1.120.0230.01116.18
7.1.110.0270.01015.80
7.1.100.0240.00815.85
7.1.90.0380.00915.83
7.1.80.0280.00615.72
7.1.70.0190.00816.02
7.1.60.0310.00822.76
7.1.50.0170.01521.86
7.1.40.0290.01524.01
7.1.30.0300.00624.17
7.1.20.0250.00624.10
7.1.10.0140.01215.08
7.1.00.0110.03217.65
7.0.330.0140.00815.39
7.0.320.0150.00315.32
7.0.310.0140.00715.20
7.0.300.0110.00815.34
7.0.290.0110.01515.34
7.0.280.0150.00715.31
7.0.270.0240.00915.85
7.0.260.0500.00915.77
7.0.250.0270.00415.52
7.0.240.0200.00915.67
7.0.230.0420.00615.55
7.0.220.0360.00915.40
7.0.210.0280.00415.19
7.0.200.0190.00615.74
7.0.190.0220.00615.23
7.0.180.0250.00514.71
7.0.170.0190.00614.63
7.0.160.0240.00614.86
7.0.150.0160.00814.94
7.0.140.0130.02917.39
7.0.130.0170.00714.98
7.0.120.0100.01215.18
7.0.110.0170.01115.07
7.0.100.0170.01014.97
7.0.90.0140.01214.83
7.0.80.1220.00814.86
7.0.70.0160.00814.95
7.0.60.0140.02017.21
7.0.50.0160.02315.96
7.0.40.0150.01716.76
7.0.30.0130.02116.83
7.0.20.0080.03516.57
7.0.10.0070.02316.58
7.0.00.0150.02216.81
5.6.400.0180.00414.32
5.6.390.0120.00614.32
5.6.380.0110.00714.18
5.6.370.0190.00514.40
5.6.360.0160.00914.08
5.6.350.0140.00514.30
5.6.340.0140.01014.08
5.6.330.0170.00614.54
5.6.320.0160.00614.49
5.6.310.0050.01614.29
5.6.300.0160.04117.48
5.6.290.0140.03917.45
5.6.280.0120.04318.75
5.6.270.0130.03517.49
5.6.260.0120.03317.45
5.6.250.0110.03417.63
5.6.240.0120.03517.54
5.6.230.0100.03617.60
5.6.220.0110.04217.35
5.6.210.0120.04418.49
5.6.200.0160.04717.68
5.6.190.0050.04418.49
5.6.180.0080.04418.55
5.6.170.0070.04618.53
5.6.160.0120.04318.47
5.6.150.0090.04618.43
5.6.140.0110.04518.58
5.6.130.0140.03918.47
5.6.120.0130.04518.47
5.6.110.0110.05318.29
5.6.100.0120.04818.44
5.6.90.0090.05418.46
5.6.80.0160.04318.04
5.6.70.0090.04017.91
5.6.60.0060.04718.07
5.6.50.0130.04218.13
5.6.40.0120.05118.02
5.6.30.0080.04317.93
5.6.20.0080.04417.95
5.6.10.0070.04518.05
5.6.00.0130.03718.06
5.5.380.0180.03215.93
5.5.370.0160.02815.86
5.5.360.0120.03615.74
5.5.350.0110.03717.40
5.5.340.0120.05416.69
5.5.330.0130.03917.57
5.5.320.0100.05717.54
5.5.310.0100.05717.40
5.5.300.0100.03917.51
5.5.290.0100.04017.50
5.5.280.0100.05617.46
5.5.270.0050.05217.48
5.5.260.0120.05317.36
5.5.250.0140.04317.08
5.5.240.0090.04517.04
5.5.230.0140.04817.06
5.5.220.0100.04617.05
5.5.210.0110.04516.94
5.5.200.0150.03817.00
5.5.190.0120.03517.00
5.5.180.0070.04116.92
5.5.170.0070.02014.13
5.5.160.0170.03516.79
5.5.150.0090.05117.08
5.5.140.0210.04516.88
5.5.130.0130.04917.09
5.5.120.0090.04816.96
5.5.110.0080.05416.87
5.5.100.0090.05316.88
5.5.90.0150.04017.01
5.5.80.0120.05116.93
5.5.70.0120.04916.78
5.5.60.0150.04316.90
5.5.50.0120.04017.04
5.5.40.0100.03717.02
5.5.30.0110.04416.82
5.5.20.0090.04716.87
5.5.10.0120.03116.86
5.5.00.0070.04517.04
5.4.450.0100.03316.74
5.4.440.0080.03816.76
5.4.430.0050.04416.71
5.4.420.0090.04516.59
5.4.410.0110.04516.58
5.4.400.0130.05116.55
5.4.390.0110.04316.55
5.4.380.0090.05116.41
5.4.370.0140.03916.40
5.4.360.0100.03916.50
5.4.350.0100.03916.50
5.4.340.0110.03216.45
5.4.330.0100.00311.34
5.4.320.0110.03116.48
5.4.310.0140.03716.45
5.4.300.0110.03516.55
5.4.290.0090.04816.58
5.4.280.0110.04616.47
5.4.270.0080.04016.45
5.4.260.0060.05216.43
5.4.250.0080.04916.50
5.4.240.0100.03816.46
5.4.230.0090.03316.54
5.4.220.0130.04916.53
5.4.210.0100.04716.40
5.4.200.0170.04516.52
5.4.190.0120.04616.54
5.4.180.0060.05116.46
5.4.170.0120.04716.46
5.4.160.0090.04316.40
5.4.150.0090.03816.38
5.4.140.0050.04614.83
5.4.130.0080.04214.82
5.4.120.0050.03914.76
5.4.110.0090.04414.82
5.4.100.0070.04914.79
5.4.90.0050.03314.81
5.4.80.0080.04214.81
5.4.70.0070.04514.79
5.4.60.0080.04814.79
5.4.50.0100.04214.85
5.4.40.0130.04114.79
5.4.30.0090.04114.80
5.4.20.0090.04914.77
5.4.10.0090.03414.77
5.4.00.0100.02814.44
5.3.290.0110.03713.65
5.3.280.0060.04513.62
5.3.270.0070.04913.57
5.3.260.0060.04213.61
5.3.250.0120.04313.54
5.3.240.0100.03413.56
5.3.230.0140.04413.62
5.3.220.0130.03413.60
5.3.210.0080.03413.56
5.3.200.0050.04113.60
5.3.190.0030.05813.60
5.3.180.0100.04013.46
5.3.170.0060.04813.54
5.3.160.0100.04313.56
5.3.150.0090.04413.47
5.3.140.0130.04613.60
5.3.130.0080.04213.54
5.3.120.0090.03613.45
5.3.110.0140.04713.46
5.3.100.0090.05013.20
5.3.90.0070.03813.22
5.3.80.0110.03113.15
5.3.70.0040.03713.18
5.3.60.0090.04313.20
5.3.50.0110.03513.17
5.3.40.0050.03713.09
5.3.30.0080.04213.12
5.3.20.0070.04512.98
5.3.10.0120.03212.99
5.3.00.0050.03612.99

preferences:
51.41 ms | 403 KiB | 5 Q