3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($dividend, $divider) { $reminder = (($dividend % $divider) + abs($divider)) % abs($divider); $quotient = ($dividend - $reminder) / $divider; printf("%2d/%2d = %2d (remainder %d)\n", $dividend, $divider, $quotient, $reminder); } f(7, 3); f(7, -3); f(-7, 3); f(-7, -3);

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.4.20.0120.00917.80
8.4.10.0030.01317.55
8.3.150.0070.01316.55
8.3.140.0100.00717.39
8.3.130.0080.01118.52
8.3.120.0030.00918.93
8.3.110.0030.00718.09
8.3.100.0100.00016.63
8.3.90.0060.00326.77
8.3.80.0030.00619.36
8.3.70.0070.00716.75
8.3.60.0120.00316.50
8.3.50.0170.00521.92
8.3.40.0070.00718.85
8.3.30.0110.00318.51
8.3.20.0070.00020.19
8.3.10.0000.00723.65
8.3.00.0040.00419.13
8.2.270.0120.00617.29
8.2.260.0150.00316.98
8.2.250.0000.00918.55
8.2.240.0030.00617.44
8.2.230.0080.01122.58
8.2.220.0000.00824.06
8.2.210.0040.00426.77
8.2.200.0090.00018.88
8.2.190.0150.00416.58
8.2.180.0130.01316.32
8.2.170.0140.00322.96
8.2.160.0090.00620.35
8.2.150.0000.00724.18
8.2.140.0000.00724.66
8.2.130.0000.00726.16
8.2.120.0080.00017.50
8.2.110.0030.00619.33
8.2.100.0070.00417.91
8.2.90.0080.00020.32
8.2.80.0040.00417.97
8.2.70.0090.00017.93
8.2.60.0050.00317.93
8.2.50.0000.00818.10
8.2.40.0000.00820.40
8.2.30.0030.00320.64
8.2.20.0000.00717.58
8.2.10.0000.00718.13
8.2.00.0040.00418.14
8.1.310.0030.00620.25
8.1.300.0120.00618.48
8.1.290.0090.00030.84
8.1.280.0030.01225.92
8.1.270.0060.00324.66
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00022.42
8.1.230.0110.00020.88
8.1.220.0080.00017.74
8.1.210.0000.00819.02
8.1.200.0030.00617.36
8.1.190.0060.00317.11
8.1.180.0030.00618.10
8.1.170.0050.00318.65
8.1.160.0000.00920.83
8.1.150.0020.00518.84
8.1.140.0060.00319.51
8.1.130.0000.00717.53
8.1.120.0000.00717.33
8.1.110.0050.00317.41
8.1.100.0000.00817.44
8.1.90.0060.00317.43
8.1.80.0040.00417.38
8.1.70.0000.00717.22
8.1.60.0050.00317.63
8.1.50.0040.00417.47
8.1.40.0040.00417.44
8.1.30.0040.00417.67
8.1.20.0000.00717.70
8.1.10.0040.00417.49
8.1.00.0070.00317.48
8.0.300.0000.00720.02
8.0.290.0040.00416.75
8.0.280.0030.00318.35
8.0.270.0070.00016.73
8.0.260.0030.00317.14
8.0.250.0030.00317.00
8.0.240.0030.00516.96
8.0.230.0070.00016.86
8.0.220.0000.00816.78
8.0.210.0070.00016.79
8.0.200.0030.00516.94
8.0.190.0040.00416.87
8.0.180.0050.00216.94
8.0.170.0070.00616.93
8.0.160.0000.00716.96
8.0.150.0000.00716.89
8.0.140.0000.00716.87
8.0.130.0060.00013.38
8.0.120.0030.00516.88
8.0.110.0000.00716.98
8.0.100.0040.00416.98
8.0.90.0030.00516.69
8.0.80.0170.00316.94
8.0.70.0040.00416.84
8.0.60.0040.00416.76
8.0.50.0050.00316.75
8.0.30.0150.00517.13
8.0.20.0100.00817.42
8.0.10.0040.00416.89
8.0.00.0130.00618.10
7.4.330.0000.00516.77
7.4.320.0000.00616.54
7.4.300.0050.00516.60
7.4.290.0030.00316.65
7.4.280.0040.00416.51
7.4.270.0000.00716.45
7.4.260.0070.00016.64
7.4.250.0050.00316.62
7.4.240.0020.00516.47
7.4.230.0070.00016.48
7.4.220.0100.01416.61
7.4.210.0030.01016.56
7.4.200.0040.00416.52
7.4.160.0120.00416.37
7.4.150.0150.00317.40
7.4.140.0090.01117.86
7.4.130.0090.01116.52
7.4.120.0090.01116.45
7.4.110.0150.00416.37
7.4.100.0130.01016.38
7.4.90.0110.00716.57
7.4.80.0080.01419.39
7.4.70.0070.01516.53
7.4.60.0100.01016.68
7.4.50.0030.01216.29
7.4.40.0090.00916.60
7.4.30.0090.01216.48
7.4.00.0080.00415.20
7.3.330.0030.00313.33
7.3.320.0020.00313.29
7.3.310.0030.00316.18
7.3.300.0000.00716.22
7.3.290.0110.00416.32
7.3.280.0060.01016.33
7.3.270.0130.00417.40
7.3.260.0070.01016.50
7.3.250.0120.00616.41
7.3.240.0110.00616.65
7.3.230.0080.00916.39
7.3.210.0090.00616.64
7.3.200.0100.00716.31
7.3.190.0070.01016.61
7.3.180.0120.00616.67
7.3.170.0070.01016.57
7.3.160.0110.01216.47
7.2.330.0100.00716.74
7.2.320.0160.00016.55
7.2.310.0130.00416.47
7.2.300.0060.01116.66
7.2.290.0130.00316.46
7.2.60.0120.00316.76
7.2.00.0040.01119.44
7.1.200.0110.00915.74
7.1.100.0030.00618.09
7.1.70.0000.01017.02
7.1.60.0130.01019.50
7.1.50.0090.01216.92
7.1.00.0100.07022.46
7.0.200.0030.00516.74
7.0.60.0130.07720.07
7.0.50.0100.06017.87
7.0.40.0130.07719.96
7.0.30.0330.06020.26
7.0.20.0300.08020.12
7.0.10.0100.08020.33
7.0.00.0000.09020.22
5.6.280.0100.06321.13
5.6.210.0100.06720.54
5.6.200.0000.07318.34
5.6.190.0070.04320.68
5.6.180.0300.05320.39
5.6.170.0130.04320.39
5.6.160.0100.03720.55
5.6.150.0100.04718.19
5.6.140.0100.06018.11
5.6.130.0100.07718.18
5.6.120.0030.09021.00
5.6.110.0130.07321.12
5.6.100.0030.04020.89
5.6.90.0100.08021.11
5.6.80.0070.08020.51
5.5.350.0200.07720.39
5.5.340.0000.04317.99
5.5.330.0100.06720.43
5.5.320.0030.08020.41
5.5.310.0170.04720.27
5.5.300.0030.08318.08
5.5.290.0100.08018.01
5.5.280.0100.08320.77
5.5.270.0170.05720.79
5.5.260.0000.08720.80
5.5.250.0170.07320.79
5.5.240.0170.05720.26

preferences:
28.78 ms | 403 KiB | 5 Q