3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1, 2, 3, 4, 5, 6, 7, 8, 9); reset ($a); foreach ($a as $v) { echo('Array points to: ' . current($a) . ' foreach() is at element: ' . $v . PHP_EOL); } echo('After loop array points to: ' . current($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.3.40.0120.00318.84
8.3.30.0140.00018.75
8.3.20.0100.01019.16
8.3.10.0040.00421.90
8.3.00.0000.00720.61
8.2.170.0030.01022.96
8.2.160.0070.00722.08
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00017.97
8.2.120.0040.00426.35
8.2.110.0050.00522.32
8.2.100.0060.00617.66
8.2.90.0030.00617.75
8.2.80.0050.00318.64
8.2.70.0030.00517.63
8.2.60.0020.00518.16
8.2.50.0070.00318.10
8.2.40.0040.00419.42
8.2.30.0040.00419.23
8.2.20.0050.00518.04
8.2.10.0040.00417.93
8.2.00.0050.00317.70
8.1.270.0030.00618.78
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0070.00424.01
8.1.230.0060.00319.09
8.1.220.0030.00617.74
8.1.210.0060.00318.77
8.1.200.0040.00417.23
8.1.190.0040.00417.13
8.1.180.0040.00418.10
8.1.170.0040.00418.57
8.1.160.0000.00718.82
8.1.150.0000.00718.93
8.1.140.0030.00322.20
8.1.130.0000.00620.30
8.1.120.0000.00817.38
8.1.110.0040.00417.40
8.1.100.0040.00417.47
8.1.90.0080.00017.50
8.1.80.0040.00417.34
8.1.70.0030.00317.36
8.1.60.0040.00417.58
8.1.50.0040.00417.37
8.1.40.0030.00517.48
8.1.30.0060.00317.62
8.1.20.0000.00817.68
8.1.10.0000.00717.41
8.1.00.0000.00817.44
8.0.300.0040.00418.77
8.0.290.0070.00016.58
8.0.280.0000.00818.50
8.0.270.0040.00417.13
8.0.260.0030.00318.44
8.0.250.0000.00716.79
8.0.240.0070.00016.91
8.0.230.0030.00316.93
8.0.220.0040.00416.84
8.0.210.0040.00416.87
8.0.200.0000.00716.98
8.0.190.0050.00516.77
8.0.180.0040.00416.85
8.0.170.0060.00316.94
8.0.160.0040.00416.78
8.0.150.0040.00416.77
8.0.140.0040.00416.84
8.0.130.0050.00013.29
8.0.120.0040.00416.74
8.0.110.0040.00416.88
8.0.100.0000.00816.83
8.0.90.0080.00016.75
8.0.80.0050.01116.77
8.0.70.0040.00416.77
8.0.60.0040.00416.95
8.0.50.0040.00416.75
8.0.30.0060.01117.11
8.0.20.0040.01517.40
8.0.10.0070.00016.88
8.0.00.0140.00316.81
7.4.330.0050.00015.55
7.4.320.0070.00016.50
7.4.300.0030.00316.51
7.4.290.0030.00316.49
7.4.280.0040.00416.54
7.4.270.0000.00916.46
7.4.260.0030.00316.57
7.4.250.0000.00816.55
7.4.240.0000.00716.45
7.4.230.0070.00016.62
7.4.220.0000.00716.57
7.4.210.0110.00216.60
7.4.200.0070.00016.39
7.4.160.0050.01116.47
7.4.140.0130.00717.86
7.4.130.0120.00616.41
7.4.120.0080.01016.42
7.4.110.0080.01116.45
7.4.100.0170.01016.41
7.4.90.0090.00916.36
7.4.80.0100.00719.39
7.4.70.0160.00416.41
7.4.60.0050.01316.48
7.4.50.0100.00616.50
7.4.40.0100.00716.47
7.4.00.0040.01114.90
7.3.330.0060.00013.02
7.3.320.0000.00513.16
7.3.310.0000.00816.22
7.3.300.0030.00316.07
7.3.290.0000.00816.30
7.3.280.0060.01116.28
7.3.260.0100.01016.41
7.3.240.0100.00816.46
7.3.230.0140.00316.59
7.3.210.0080.00816.38
7.3.200.0130.00616.36
7.3.190.0160.00416.22
7.3.180.0070.01016.56
7.3.170.0170.00316.48
7.3.160.0130.00316.57
7.2.330.0150.00316.43
7.2.320.0170.00716.54
7.2.310.0100.01416.73
7.2.300.0000.01616.68
7.2.290.0100.00716.57
7.2.110.0230.00014.40
7.2.100.0130.00814.31
7.2.90.0170.00614.70
7.2.80.0190.01314.69
7.2.70.0310.00415.05
7.2.60.0450.01114.88
7.2.50.0160.01015.03
7.2.40.0390.00414.85
7.2.30.0250.00415.03
7.2.20.0290.00614.90
7.2.10.0190.01214.82
7.2.00.0110.00415.05
7.1.230.0270.00013.88
7.1.220.0220.01013.83
7.1.210.0150.01213.93
7.1.200.0310.00313.98
7.1.190.0250.00613.89
7.1.180.0150.00513.81
7.1.170.0200.00613.90
7.1.160.0330.00613.80
7.1.150.0190.01013.91
7.1.140.0350.00613.80
7.1.130.0440.00014.04
7.1.120.0130.01013.73
7.1.110.0160.00913.84
7.1.100.0070.00713.68
7.1.90.0440.00413.82
7.1.80.0290.00613.91
7.1.70.0260.00813.77
7.1.60.0400.01031.82
7.1.50.0480.01331.86
7.1.40.0440.00731.75
7.1.30.0220.01131.77
7.1.20.0350.01731.70
7.1.10.0160.01213.71
7.1.00.0080.00913.76
7.0.310.0310.00413.39
7.0.300.0210.00613.65
7.0.290.0230.00713.50
7.0.280.0090.00613.52
7.0.270.0100.01113.71
7.0.260.0270.00413.18
7.0.250.0360.00013.25
7.0.240.0130.01013.46
7.0.230.0270.01113.65
7.0.220.0060.00813.50
7.0.210.0160.00313.58
7.0.200.0400.00413.58
7.0.190.0270.00913.60
7.0.180.0230.00313.41
7.0.170.0170.00813.59
7.0.160.0210.00613.55
7.0.150.0370.00713.36
7.0.140.0150.00013.73
7.0.130.0380.00313.73
7.0.120.0200.00613.63
7.0.110.0160.00813.53
7.0.100.0220.00313.63
7.0.90.0320.00513.48
7.0.80.0330.00613.64
7.0.70.0280.01113.63
7.0.60.0190.00613.54
7.0.50.0220.00713.50
7.0.40.0090.00513.72
7.0.30.0390.00613.66
7.0.20.0240.00513.60
7.0.10.0490.00613.62
7.0.00.0340.00813.54
5.6.380.0080.00814.35
5.6.370.0040.01113.91
5.6.360.0070.00714.24
5.6.350.0000.01614.26
5.6.340.0080.00314.23
5.6.330.0170.00014.27
5.6.320.0080.00814.20
5.6.310.0060.00914.33
5.6.300.0040.01314.12
5.6.290.0080.01014.15
5.6.280.0060.00914.20
5.6.270.0130.00914.21
5.6.260.0040.01714.00
5.6.250.0180.00014.07
5.6.240.0120.00714.33
5.6.230.0040.01214.18
5.6.220.0000.01714.17
5.6.210.0040.00814.18
5.6.200.0000.01614.23
5.6.190.0070.00714.13
5.6.180.0090.00914.04
5.6.170.0070.00714.17
5.6.160.0050.00814.16
5.6.150.0040.00914.22
5.6.140.0030.01014.16
5.6.130.0100.00714.20
5.6.120.0040.00814.38
5.6.110.0070.00714.19
5.6.100.0140.00414.23
5.6.90.0030.01014.13
5.6.80.0000.01613.94
5.6.70.0130.00314.17
5.6.60.0080.00814.44
5.6.50.0110.00414.16
5.6.40.0030.01214.04
5.6.30.0060.00914.04
5.6.20.0070.00614.14
5.6.10.0000.01214.12
5.6.00.0030.00913.96
5.5.380.0130.00411.29
5.5.370.0080.00811.29
5.5.360.0060.00911.29
5.5.350.0090.00711.29
5.5.340.0140.00011.29
5.5.330.0100.00311.29
5.5.320.0130.00311.29
5.5.310.0140.00011.29
5.5.300.0060.00911.29
5.5.290.0100.00611.29
5.5.280.0080.00811.29
5.5.270.0040.01311.29
5.5.260.0090.00911.34
5.5.250.0120.00411.29
5.5.240.0100.00511.29
5.5.230.0120.00611.29
5.5.220.0120.00411.29
5.5.210.0000.01311.29
5.5.200.0030.01411.29
5.5.190.0100.00611.29
5.5.180.0090.00611.29
5.5.170.0150.00714.38
5.5.160.0080.00811.29
5.5.150.0120.00311.29
5.5.140.0100.00511.29
5.5.130.0110.00511.29
5.5.120.0080.00911.29
5.5.110.0110.00611.29
5.5.100.0070.00711.29
5.5.90.0140.00011.29
5.5.80.0080.00811.29
5.5.70.0070.01111.29
5.5.60.0100.00611.29
5.5.50.0130.00211.29
5.5.40.0130.00711.29
5.5.30.0070.00811.29
5.5.20.0170.00011.29
5.5.10.0050.00911.29
5.5.00.0110.00211.29
5.4.450.0060.00611.29
5.4.440.0110.00411.29
5.4.430.0070.00811.29
5.4.420.0100.00511.29
5.4.410.0120.00311.29
5.4.400.0130.00011.29
5.4.390.0000.01611.29
5.4.380.0040.01111.29
5.4.370.0130.00411.29
5.4.360.0000.01611.29
5.4.350.0040.01211.29
5.4.340.0090.00611.29
5.4.330.0040.01311.29
5.4.320.0110.00311.29
5.4.310.0150.00011.29
5.4.300.0140.00011.29
5.4.290.0110.00411.29
5.4.280.0090.00711.29
5.4.270.0060.01111.29
5.4.260.0150.00311.29
5.4.250.0090.00611.29
5.4.240.0110.00411.29
5.4.230.0170.00011.29
5.4.220.0050.01011.29
5.4.210.0150.00011.29
5.4.200.0080.00811.29
5.4.190.0090.00911.29
5.4.180.0140.00311.29
5.4.170.0090.00411.29
5.4.160.0080.01211.29
5.4.150.0050.00711.29
5.4.140.0110.00611.29
5.4.130.0090.00311.29
5.4.120.0130.00411.29
5.4.110.0090.00611.29
5.4.100.0100.00511.29
5.4.90.0110.00411.29
5.4.80.0080.00411.29
5.4.70.0080.00811.29
5.4.60.0070.00711.29
5.4.50.0100.00511.29
5.4.40.0090.00411.29
5.4.30.0080.00811.29
5.4.20.0100.00411.29
5.4.10.0030.01111.29
5.4.00.0120.00311.29
5.3.290.0080.00711.29
5.3.280.0090.00411.29
5.3.270.0050.00511.29
5.3.260.0120.00311.29
5.3.250.0130.00011.29
5.3.240.0070.00511.29
5.3.230.0100.00311.29
5.3.220.0110.00211.29
5.3.210.0130.00311.29
5.3.200.0120.00011.29
5.3.190.0090.00511.29
5.3.180.0110.00311.29
5.3.170.0120.00211.29
5.3.160.0100.00311.29
5.3.150.0080.00811.29
5.3.140.0080.00611.29
5.3.130.0100.00311.29
5.3.120.0070.00711.29
5.3.110.0120.00011.29
5.3.100.0100.00511.29
5.3.90.0150.00011.29
5.3.80.0050.01011.29
5.3.70.0080.00811.29
5.3.60.0090.00511.29
5.3.50.0090.00511.29
5.3.40.0070.00711.29
5.3.30.0100.00311.29
5.3.20.0110.00311.29
5.3.10.0080.00311.29
5.3.00.0100.00411.29
5.2.170.0040.00911.29
5.2.160.0000.01111.29
5.2.150.0060.00611.29
5.2.140.0090.00311.29
5.2.130.0130.00011.29
5.2.120.0050.00811.29
5.2.110.0060.00711.29
5.2.100.0080.00411.29
5.2.90.0060.00611.29
5.2.80.0030.00911.29
5.2.70.0050.00711.29
5.2.60.0120.00011.29
5.2.50.0110.00011.29
5.2.40.0080.00511.29
5.2.30.0050.00611.29
5.2.20.0060.00611.29
5.2.10.0080.00411.29
5.2.00.0060.00411.29
5.1.60.0060.00311.29
5.1.50.0080.00211.29
5.1.40.0080.00011.29
5.1.30.0100.00011.29
5.1.20.0080.00311.29
5.1.10.0070.00311.29
5.1.00.0080.00511.29
5.0.50.0080.00311.29
5.0.40.0070.00311.29
5.0.30.0060.00411.29
5.0.20.0050.00311.29
5.0.10.0030.00511.29
5.0.00.0040.00411.29
4.4.90.0050.00311.29
4.4.80.0060.00011.29
4.4.70.0000.00811.29
4.4.60.0080.00211.29
4.4.50.0070.00011.29
4.4.40.0060.00011.29
4.4.30.0000.00711.29
4.4.20.0080.00211.29
4.4.10.0090.00011.29
4.4.00.0000.00711.29
4.3.110.0030.00511.29
4.3.100.0020.00411.29
4.3.90.0030.00311.29
4.3.80.0080.00011.29
4.3.70.0050.00311.29
4.3.60.0070.00011.29
4.3.50.0080.00011.29
4.3.40.0070.00011.29
4.3.30.0030.00311.29
4.3.20.0040.00211.29
4.3.10.0040.00411.29
4.3.00.0030.00311.29

preferences:
63.88 ms | 400 KiB | 5 Q