3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_index = 1; $move_to = $current_index + 8; $last_index = 5; if ($move_to > $last_index) { $move_to = ($move_to % $last_index - 1); } echo $move_to; $current_index = 0; $move_to = $current_index + 4; $last_index = 5; if ($move_to > $last_index) { $move_to = ($move_to % $last_index - 1); } echo $move_to;

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.0120.00618.27
8.3.50.0120.00918.18
8.3.40.0070.01118.70
8.3.30.0110.00418.71
8.3.20.0000.00821.85
8.3.10.0060.00323.68
8.3.00.0070.00023.61
8.2.180.0070.01416.50
8.2.170.0100.00322.96
8.2.160.0070.01020.55
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00419.70
8.2.120.0040.00426.35
8.2.110.0060.00322.01
8.2.100.0070.00417.91
8.2.90.0070.00717.38
8.2.80.0000.00817.97
8.2.70.0060.00317.80
8.2.60.0000.00818.03
8.2.50.0000.00818.10
8.2.40.0000.00919.09
8.2.30.0040.00419.28
8.2.20.0000.00819.90
8.2.10.0000.00719.19
8.2.00.0050.00319.47
8.1.280.0110.00425.92
8.1.270.0000.00718.92
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0060.00322.55
8.1.230.0120.00017.77
8.1.220.0040.00417.78
8.1.210.0050.00318.77
8.1.200.0030.00617.25
8.1.190.0040.00420.20
8.1.180.0030.00518.10
8.1.170.0050.00318.49
8.1.160.0070.00018.84
8.1.150.0050.00318.83
8.1.140.0000.00723.98
8.1.130.0000.00720.07
8.1.120.0000.00717.43
8.1.110.0040.00417.41
8.1.100.0000.00717.30
8.1.90.0040.00417.42
8.1.80.0000.00717.30
8.1.70.0000.00717.45
8.1.60.0030.00517.55
8.1.50.0080.00317.48
8.1.40.0040.00417.50
8.1.30.0040.00417.58
8.1.20.0030.00517.61
8.1.10.0040.00417.57
8.1.00.0020.00517.39
8.0.300.0060.00318.77
8.0.290.0060.00316.75
8.0.280.0040.00218.32
8.0.270.0000.00717.20
8.0.260.0000.00618.40
8.0.250.0000.00816.85
8.0.240.0000.00616.99
8.0.230.0030.00316.83
8.0.220.0070.00016.94
8.0.210.0030.00316.93
8.0.200.0030.00316.98
8.0.190.0080.00016.87
8.0.180.0040.00416.94
8.0.170.0060.00316.92
8.0.160.0000.00716.95
8.0.150.0000.00816.85
8.0.140.0000.00716.74
8.0.130.0000.00713.37
8.0.120.0000.00716.77
8.0.110.0050.00316.74
8.0.100.0040.00416.96
8.0.90.0040.00416.77
8.0.80.0070.01016.86
8.0.70.0000.00816.71
8.0.60.0040.00416.89
8.0.50.0000.00717.01
8.0.30.0090.00816.99
8.0.20.0080.01117.06
8.0.10.0000.00716.92
8.0.00.0070.01016.88
7.4.330.0020.00215.55
7.4.320.0000.00616.44
7.4.300.0030.00316.58
7.4.290.0000.00716.46
7.4.280.0050.00316.41
7.4.270.0050.00316.60
7.4.260.0060.00016.42
7.4.250.0030.00316.51
7.4.240.0060.00316.55
7.4.230.0000.00816.35
7.4.220.0020.00516.26
7.4.210.0070.00716.54
7.4.200.0070.00016.48
7.4.160.0090.00616.41
7.4.140.0120.01217.86
7.4.130.0030.01416.55
7.4.120.0120.00916.54
7.4.110.0070.01016.42
7.4.100.0120.01116.44
7.4.90.0140.00416.34
7.4.80.0150.00619.39
7.4.70.0150.00516.57
7.4.60.0070.01016.44
7.4.50.0090.00616.59
7.4.40.0060.01016.50
7.4.10.0120.00615.14
7.4.00.0080.00914.96
7.3.330.0000.00613.11
7.3.320.0030.00313.24
7.3.310.0000.00716.13
7.3.300.0070.00016.25
7.3.290.0030.00316.26
7.3.280.0090.00816.27
7.3.260.0110.00616.46
7.3.240.0100.01016.41
7.3.230.0060.01016.15
7.3.210.0160.00016.25
7.3.200.0080.00816.41
7.3.190.0090.01216.30
7.3.180.0060.01316.66
7.3.170.0140.00916.21
7.3.160.0070.01016.38
7.3.130.0140.00414.84
7.3.120.0060.01014.78
7.3.110.0120.00314.71
7.3.100.0100.00314.71
7.3.90.0060.00614.71
7.3.80.0060.00614.77
7.3.70.0120.00014.83
7.3.60.0000.01114.71
7.3.50.0040.01114.45
7.3.40.0030.00714.75
7.3.30.0000.01414.66
7.3.20.0040.00416.63
7.3.10.0030.00916.70
7.3.00.1310.00815.36
7.2.330.0130.00416.50
7.2.320.0120.00916.73
7.2.310.0110.00616.53
7.2.300.0150.00316.38
7.2.290.0110.01116.39
7.2.260.0100.00714.87
7.2.250.0080.00815.11
7.2.240.0030.01315.01
7.2.230.0130.00314.94
7.2.220.0040.01214.70
7.2.210.0070.00314.95
7.2.200.0000.01114.87
7.2.190.0040.00714.66
7.2.180.0070.00714.96
7.2.170.0070.00714.98
7.2.160.0000.01115.09
7.2.150.0030.01016.54
7.2.140.0030.00616.81
7.2.130.1400.01115.68
7.2.120.0070.01015.48
7.2.110.0100.01015.55
7.2.100.0160.00815.59
7.2.90.0050.01215.59
7.2.80.0110.00815.38
7.2.70.0230.00615.81
7.2.60.0140.00115.65
7.2.50.0660.00915.52
7.2.40.0150.00515.69
7.2.30.0140.00315.71
7.2.20.0130.00415.68
7.2.10.0100.00515.70
7.2.00.0100.00715.74
7.1.330.0030.01315.93
7.1.320.0080.00315.59
7.1.310.0080.00415.62
7.1.300.0040.00715.84
7.1.290.0000.00915.46
7.1.280.0000.01715.50
7.1.270.0040.01115.64
7.1.260.0120.00015.76
7.1.250.1700.00314.54
7.1.240.0030.01015.79
7.1.230.0080.00315.87
7.1.220.0050.00315.87
7.1.210.0060.00615.88
7.1.200.0090.00315.50
7.1.190.0070.00715.62
7.1.180.0060.00615.84
7.1.170.0090.00315.72
7.1.160.0060.00615.79
7.1.150.0040.00415.71
7.1.140.0030.00615.69
7.1.130.0000.01215.73
7.1.120.0000.01715.66
7.1.110.0000.01515.59
7.1.100.0060.00615.68
7.1.90.0100.00315.36
7.1.80.0040.00415.90
7.1.70.0000.01215.82
7.1.60.0080.00515.94
7.1.50.0070.00715.69
7.1.40.0060.00815.84
7.1.30.0040.01115.52
7.1.20.0030.00715.75
7.1.10.0060.00615.41
7.1.00.0060.01015.49
7.0.330.0850.00514.14
7.0.320.0060.00615.19
7.0.310.0030.01015.39
7.0.300.0000.00815.34
7.0.290.0070.00715.67
7.0.280.0070.00715.43
7.0.270.0000.01215.23
7.0.260.0040.01515.53
7.0.250.0060.01215.57
7.0.240.0030.00915.26
7.0.230.0070.00715.14
7.0.220.0080.00015.60
7.0.210.0030.01015.12
7.0.200.0000.01015.47
7.0.190.0000.00815.26
7.0.180.0060.00615.39
7.0.170.0040.00815.33
7.0.160.0040.00415.56
7.0.150.0030.00615.34
7.0.140.0070.00715.38
7.0.130.0040.00715.40
7.0.120.0000.01215.54
7.0.110.0070.00715.62
7.0.100.0040.00815.50
7.0.90.0070.00715.47
7.0.80.0030.00915.45
7.0.70.0000.01315.32
7.0.60.0090.00015.51
7.0.50.0030.01015.56
7.0.40.0030.00613.64
7.0.30.0040.00713.48
7.0.20.0090.00313.35
7.0.10.0030.00513.57
7.0.00.0030.01013.50
5.6.400.0040.00414.46
5.6.390.0000.01714.63
5.6.380.0050.00914.36
5.6.370.0040.00414.39
5.6.360.0030.00714.51
5.6.350.0040.01214.69
5.6.340.0040.00414.59
5.6.330.0000.01514.55
5.6.320.0070.00414.09
5.6.310.0080.00614.35
5.6.300.0000.01714.07
5.6.290.0100.00714.61
5.6.280.0040.00414.68
5.6.270.0060.00614.56
5.6.260.0060.01214.24
5.6.250.0100.00014.33
5.6.240.0060.00614.51
5.6.230.0090.00414.41
5.6.220.0030.00814.36
5.6.210.0070.01114.15
5.6.200.0040.00414.58
5.6.190.0060.00614.32
5.6.180.0000.00914.23
5.6.170.0000.00814.22
5.6.160.0040.01114.11
5.6.150.0030.01014.68
5.6.140.0050.00514.35
5.6.130.0030.01014.55
5.6.120.0030.01314.30
5.6.110.0030.01014.40
5.6.100.0060.00314.36
5.6.90.0030.00714.27
5.6.80.0060.00914.25
5.6.70.0000.01414.25
5.6.60.0070.00714.53
5.6.50.0100.00714.31
5.6.40.0000.00913.97
5.6.30.0030.01514.10
5.6.20.0110.00314.07
5.6.10.0090.00314.20
5.6.00.0090.00314.31

preferences:
31.7 ms | 400 KiB | 5 Q