3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_index = 8; $move_to = $current_index + 5; $last_index = 13; 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.0070.01018.43
8.3.50.0040.01118.16
8.3.40.0130.00718.89
8.3.30.0110.00718.59
8.3.20.0080.00021.82
8.3.10.0000.00823.67
8.3.00.0000.00723.61
8.2.180.0110.00716.32
8.2.170.0040.01122.96
8.2.160.0000.01420.22
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.00
8.2.110.0030.00622.23
8.2.100.0070.00417.72
8.2.90.0040.00417.63
8.2.80.0040.00417.97
8.2.70.0080.00017.92
8.2.60.0000.00817.87
8.2.50.0030.00618.10
8.2.40.0030.00619.34
8.2.30.0040.00419.34
8.2.20.0030.00519.83
8.2.10.0040.00419.19
8.2.00.0000.00819.27
8.1.280.0150.00025.92
8.1.270.0080.00018.77
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0040.00422.46
8.1.230.0080.00317.76
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0000.00917.13
8.1.190.0040.00420.11
8.1.180.0000.00918.10
8.1.170.0000.00818.56
8.1.160.0050.00218.77
8.1.150.0050.00218.70
8.1.140.0000.00722.06
8.1.130.0000.00719.98
8.1.120.0070.00017.38
8.1.110.0050.00317.40
8.1.100.0040.00417.25
8.1.90.0030.00517.28
8.1.80.0020.00517.44
8.1.70.0030.00517.36
8.1.60.0000.00817.53
8.1.50.0070.00417.43
8.1.40.0050.00317.33
8.1.30.0000.00717.55
8.1.20.0000.00717.55
8.1.10.0000.00717.52
8.1.00.0040.00417.33
8.0.300.0080.00019.73
8.0.290.0050.00216.75
8.0.280.0000.00718.44
8.0.270.0000.00817.24
8.0.260.0060.00018.42
8.0.250.0080.00016.98
8.0.240.0000.00716.78
8.0.230.0040.00416.89
8.0.220.0040.00416.80
8.0.210.0040.00416.71
8.0.200.0070.00016.84
8.0.190.0000.00716.79
8.0.180.0080.00016.89
8.0.170.0030.00616.85
8.0.160.0050.00316.80
8.0.150.0050.00316.77
8.0.140.0040.00416.69
8.0.130.0000.00813.26
8.0.120.0040.00416.82
8.0.110.0050.00216.81
8.0.100.0000.00816.82
8.0.90.0000.00716.77
8.0.80.0100.00716.80
8.0.70.0000.00716.84
8.0.60.0070.00016.77
8.0.50.0050.00216.70
8.0.30.0110.00916.94
8.0.20.0120.00617.29
8.0.10.0040.00416.95
8.0.00.0130.00716.69
7.4.330.0000.00515.55
7.4.320.0000.00616.44
7.4.300.0000.00616.54
7.4.290.0030.00316.33
7.4.280.0000.00816.42
7.4.270.0000.00716.54
7.4.260.0000.00616.52
7.4.250.0070.00016.48
7.4.240.0080.00016.45
7.4.230.0000.00716.55
7.4.220.0090.00016.60
7.4.210.0160.00216.63
7.4.200.0050.00216.40
7.4.160.0100.00716.48
7.4.140.0110.00917.86
7.4.130.0090.00816.27
7.4.120.0110.00616.43
7.4.110.0090.00916.33
7.4.100.0150.00616.42
7.4.90.0120.00616.32
7.4.80.0100.01319.39
7.4.70.0160.00816.39
7.4.60.0100.00716.47
7.4.50.0040.00816.14
7.4.40.0030.01316.17
7.4.00.0090.00615.04
7.3.330.0000.00512.96
7.3.320.0000.00613.10
7.3.310.0070.00016.13
7.3.300.0000.00716.24
7.3.290.0030.00316.17
7.3.280.0060.00916.22
7.3.260.0080.00916.29
7.3.240.0090.00716.42
7.3.230.0100.00616.56
7.3.210.0070.01016.37
7.3.200.0040.01216.50
7.3.190.0140.00916.24
7.3.180.0080.00916.18
7.3.170.0090.01216.49
7.3.160.0070.01316.45
7.3.00.3680.01014.01
7.2.330.0100.01016.54
7.2.320.0000.01616.60
7.2.310.0100.00616.68
7.2.300.0060.01616.55
7.2.290.0070.01016.73
7.2.130.3760.01014.02
7.2.120.0470.00414.32
7.2.110.0160.00314.43
7.2.100.0170.00614.41
7.2.90.0120.00814.55
7.2.80.0100.00614.45
7.2.70.0130.00915.04
7.2.60.0220.00414.42
7.2.50.0180.00314.48
7.2.40.1190.01014.43
7.2.30.1060.00714.54
7.2.20.0100.00714.29
7.2.10.0150.00614.39
7.2.00.0120.00614.58
7.1.250.3830.00713.69
7.0.330.0200.00713.20
5.6.380.0100.00314.18

preferences:
57.81 ms | 400 KiB | 5 Q