3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('leg1'=>'LA', 'leg2'=>'NY', 'leg3'=>'NY', 'leg4'=>'NY', 'leg5'=>'FL'); while($current = current($a['leg2'])) { echo $current . "... "; $next = next($a); $nextnext = next($a); if($next == $current && $nextnext == $current){ echo "matches the next two values!\n"; } else { echo "does NOT match the next two values\n"; } prev($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.70.0070.00716.58
8.3.60.0070.00718.30
8.3.50.0090.00721.21
8.3.40.0120.00318.57
8.3.30.0170.00318.80
8.3.20.0000.00720.21
8.3.10.0080.00022.10
8.3.00.0040.00420.69
8.2.180.0040.01116.50
8.2.170.0150.00622.96
8.2.160.0110.00619.08
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0090.00926.16
8.2.120.0040.00419.77
8.2.110.0050.00522.25
8.2.100.0060.00617.97
8.2.90.0030.00619.05
8.2.80.0050.00218.04
8.2.70.0040.00417.50
8.2.60.0000.00817.93
8.2.50.0050.00518.07
8.2.40.0060.00318.16
8.2.30.0070.00018.17
8.2.20.0070.00017.62
8.2.10.0040.00417.79
8.2.00.0090.00017.80
8.1.280.0090.00925.92
8.1.270.0040.00418.48
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0060.00324.04
8.1.230.0110.00019.10
8.1.220.0000.00717.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0050.00317.53
8.1.180.0000.00818.52
8.1.170.0050.00518.57
8.1.160.0040.00422.13
8.1.150.0000.00818.48
8.1.140.0000.00817.43
8.1.130.0090.00017.82
8.1.120.0040.00417.33
8.1.110.0030.00617.38
8.1.100.0000.00717.45
8.1.90.0070.00017.28
8.1.80.0030.00417.36
8.1.70.0000.00817.22
8.1.60.0040.00417.50
8.1.50.0040.00417.57
8.1.40.0000.00817.50
8.1.30.0030.00617.54
8.1.20.0030.00617.52
8.1.10.0030.00717.47
8.1.00.0040.00417.55
8.0.300.0030.00618.77
8.0.290.0040.00417.04
8.0.280.0030.00318.38
8.0.270.0070.00018.00
8.0.260.0040.00416.76
8.0.250.0070.00016.87
8.0.240.0030.00616.93
8.0.230.0040.00416.97
8.0.220.0040.00416.89
8.0.210.0030.00616.76
8.0.200.0030.00316.81
8.0.190.0040.00416.98
8.0.180.0050.00216.80
8.0.170.0040.00416.91
8.0.160.0000.00816.91
8.0.150.0050.00216.90
8.0.140.0000.00816.83
8.0.130.0030.00313.24
8.0.120.0020.00516.79
8.0.110.0000.00816.79
8.0.100.0050.00216.92
8.0.90.0000.00716.80
8.0.80.0040.01116.89
8.0.70.0070.00016.75
8.0.60.0040.00416.79
8.0.50.0040.00416.95
8.0.30.0080.01017.09
8.0.20.0110.00917.40
8.0.10.0070.00016.88
8.0.00.0050.01316.77
7.4.330.0000.00515.00
7.4.320.0000.00616.36
7.4.300.0000.00716.47
7.4.290.0030.00316.36
7.4.280.0030.00316.52
7.4.270.0030.00316.48
7.4.260.0080.00016.41
7.4.250.0030.00316.39
7.4.240.0040.00316.43
7.4.230.0030.00316.60
7.4.220.0100.00716.36
7.4.210.0110.00516.44
7.4.200.0000.00716.64
7.4.190.0050.00216.61
7.4.160.0160.00016.57
7.4.150.0120.00517.40
7.4.140.0100.01017.86
7.4.130.0060.01116.39
7.4.120.0090.00716.53
7.4.110.0170.00916.42
7.4.100.0110.01016.40
7.4.90.0140.00316.47
7.4.80.0110.00619.39
7.4.70.0060.01016.50
7.4.60.0030.01416.48
7.4.50.0000.00816.52
7.4.40.0140.00322.77
7.4.30.0170.00016.59
7.4.00.0110.00414.83
7.3.330.0000.00613.13
7.3.320.0050.00012.98
7.3.310.0050.00316.19
7.3.300.0000.00716.27
7.3.290.0030.01016.37
7.3.280.0050.01016.26
7.3.270.0080.00917.40
7.3.260.0060.01016.43
7.3.250.0080.00816.28
7.3.240.0090.00916.56
7.3.230.0060.01216.39
7.3.210.0070.01416.48
7.3.200.0030.01319.39
7.3.190.0100.01016.38
7.3.180.0080.00716.29
7.3.170.0130.00316.59
7.3.160.0040.01116.30
7.3.120.0040.00714.52
7.3.10.0040.00916.49
7.3.00.0050.00916.27
7.2.330.0080.00816.50
7.2.320.0120.00616.41
7.2.310.0090.01216.55
7.2.300.0100.00616.30
7.2.290.0060.01116.54
7.2.130.0120.00516.54
7.2.120.0130.00316.32
7.2.110.0060.01016.71
7.2.100.0070.00516.50
7.2.90.0070.01016.53
7.2.80.0090.00716.49
7.2.70.0100.00516.80
7.2.60.0060.00916.43
7.2.50.0140.00816.67
7.2.40.0090.00916.49
7.2.30.0100.00916.80
7.2.20.0090.00716.41
7.2.10.0120.00016.63
7.2.00.0080.00617.39
7.1.250.0070.00415.73
7.1.200.0060.00315.47
7.1.100.0040.00818.23
7.1.70.0070.01017.07
7.1.60.0000.02519.82
7.1.50.0110.01116.86
7.1.00.0030.03322.37
7.0.200.0160.01316.82
7.0.140.0070.07021.92
7.0.60.0000.06319.92
7.0.50.0170.05017.91
7.0.40.0070.07720.05
7.0.30.0330.08020.13
7.0.20.0070.05020.19
7.0.10.0530.05020.18
7.0.00.0030.07720.19
5.6.280.0000.07720.78
5.6.210.0100.07320.65
5.6.200.0030.08318.13
5.6.190.0030.04320.41
5.6.180.1630.05020.32
5.6.170.0170.05720.47
5.6.160.0030.06020.54
5.6.150.0100.06718.11
5.6.140.0070.04018.21
5.6.130.0070.06318.15
5.6.120.0170.06721.00
5.6.110.0170.06720.97
5.6.100.0100.06321.11
5.6.90.0070.07720.96
5.6.80.0000.04020.41
5.6.70.0130.08720.47
5.5.350.0200.07020.30
5.5.340.0070.05317.91
5.5.330.0070.07720.14
5.5.320.0270.07320.34
5.5.310.0170.05720.30
5.5.300.0030.04018.00
5.5.290.0030.04017.94
5.5.280.0100.05020.80
5.5.270.0070.07720.79
5.5.260.0000.04320.86
5.5.250.0100.04020.55
5.5.240.0070.07720.25
5.4.450.0770.06719.11
5.4.440.0870.08019.54
5.4.430.0700.05719.60
5.4.420.0200.05719.13
5.4.410.0930.05319.39
5.4.400.0470.06018.76
5.4.390.0170.07718.73
5.4.380.0330.08318.69
5.4.370.0170.06718.70
5.4.360.0170.05018.59
5.4.350.0120.05611.97
5.4.340.0080.04711.97
5.4.320.0060.03612.45
5.4.310.0060.04312.45
5.4.300.0080.04712.46
5.4.290.0070.04612.45
5.4.280.0040.04012.35
5.4.270.0170.06018.83
5.4.260.0130.05018.59
5.4.250.0130.06718.73
5.4.240.0070.05318.62
5.4.230.0170.04718.79
5.4.220.0170.05718.83
5.4.210.0130.06318.94
5.4.200.0200.05018.62
5.4.190.0170.04718.77
5.4.180.0130.05718.57
5.4.170.0030.06318.90
5.4.160.0100.08018.82
5.4.150.0130.06318.92
5.4.140.0070.07716.21
5.4.130.0030.05716.39
5.4.120.0070.06716.23
5.4.110.0100.05016.36
5.4.100.0070.05316.44
5.4.90.0200.04016.43
5.4.80.0130.06016.22
5.4.70.0200.04016.18
5.4.60.0130.05016.26
5.4.50.0130.04716.10
5.4.40.0070.05016.46
5.4.30.0130.06716.34
5.4.20.0130.06016.04
5.4.10.0100.05316.41
5.4.00.0170.05315.72
5.3.290.0050.04212.80
5.3.280.0130.04714.38
5.3.270.0070.05714.62
5.3.260.0100.05714.63
5.3.250.0100.05314.63
5.3.240.0030.08014.61
5.3.230.0070.06714.38
5.3.220.0070.06014.40
5.3.210.0030.06014.45
5.3.200.0100.05314.35
5.3.190.0130.04714.61
5.3.180.0170.04714.57
5.3.170.0030.06714.61
5.3.160.0100.05014.42
5.3.150.0070.05314.57
5.3.140.0170.05714.47
5.3.130.0170.04714.42
5.3.120.0100.07714.41
5.3.110.0130.05014.38
5.3.100.0100.05714.18
5.3.90.0270.06313.71
5.3.80.0070.05314.02
5.3.70.0200.05714.06
5.3.60.0170.05313.77
5.3.50.0100.05013.89
5.3.40.0170.04313.82
5.3.30.0130.06314.06
5.3.20.0100.05013.68
5.3.10.0100.07313.53
5.3.00.0170.06313.64
5.2.170.0130.04711.06
5.2.160.0030.06311.09
5.2.150.0100.03711.14
5.2.140.0100.04711.04
5.2.130.0030.04011.12
5.2.120.0130.04011.00
5.2.110.0070.04311.21
5.2.100.0100.03311.25
5.2.90.0100.04011.00
5.2.80.0070.05010.85
5.2.70.0100.04711.00
5.2.60.0070.04310.97
5.2.50.0000.04711.04
5.2.40.0100.04011.01
5.2.30.0070.05310.73
5.2.20.0030.05010.97
5.2.10.0070.03710.98
5.2.00.0130.04310.87
5.1.60.0070.04010.04
5.1.50.0200.03010.06
5.1.40.0070.03710.06
5.1.30.0130.03010.41
5.1.20.0130.04710.51
5.1.10.0000.0479.92
5.1.00.0030.0439.98
5.0.50.0100.0338.46
5.0.40.0030.0308.18
5.0.30.0000.0478.21
5.0.20.0030.0278.27
5.0.10.0030.0308.12
5.0.00.0000.0478.21
4.4.90.0000.0277.35
4.4.80.0030.0237.35
4.4.70.0000.0277.35
4.4.60.0030.0207.35
4.4.50.0030.0237.35
4.4.40.0070.0437.35
4.4.30.0030.0237.35
4.4.20.0030.0237.35
4.4.10.0100.0237.35
4.4.00.0070.0407.35
4.3.110.0000.0237.35
4.3.100.0000.0307.35
4.3.90.0000.0277.35
4.3.80.0000.0337.35
4.3.70.0000.0207.35
4.3.60.0030.0207.35
4.3.50.0070.0177.35
4.3.40.0000.0477.35
4.3.30.0030.0237.35
4.3.20.0000.0237.35
4.3.10.0070.0207.35
4.3.00.0170.0206.75

preferences:
45.47 ms | 401 KiB | 5 Q