3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ox = 10; $oy = 10; $x = 10; $y = 15; $sx = ($ox < $x)?1:($ox==$x?0:-1); $sy = ($oy < $y)?1:($oy==$y?0:-1); var_dump($sx,$sy); //Test collisions for each cell along deplacement for($dx = $ox+$sx; $sx*$dx <= $sx*$x; $dx += $sx){ for($dy = $oy+$sy; $sy*$dy <= $sy*$y; $dy += $sy){ var_dump(array($dx,$dy)); } }

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.0240.01718.14
8.3.50.0260.01521.20
8.3.40.0310.00318.67
8.3.30.0260.00319.21
8.3.20.0190.00420.34
8.3.10.0190.00322.04
8.3.00.0160.00822.30
8.2.180.0300.01016.63
8.2.170.0280.01522.96
8.2.160.0290.01519.29
8.2.150.0080.00824.18
8.2.140.0150.00624.66
8.2.130.0330.01726.16
8.2.120.0100.00317.75
8.2.110.0270.00021.00
8.2.100.0180.01117.97
8.2.90.0040.00719.17
8.2.80.0110.00417.97
8.2.70.0140.00017.63
8.2.60.0120.00318.05
8.2.50.0100.00718.07
8.2.40.0100.00318.16
8.2.30.0060.00918.25
8.2.20.0030.01017.68
8.2.10.0070.00717.70
8.2.00.0110.00417.64
8.1.280.0290.01025.92
8.1.270.0140.00722.10
8.1.260.0210.00026.35
8.1.250.0150.00028.09
8.1.240.0200.00622.19
8.1.230.0250.00420.80
8.1.220.0040.01117.74
8.1.210.0080.00618.77
8.1.200.0130.00717.22
8.1.190.0130.00017.29
8.1.180.0110.00318.59
8.1.170.0060.01018.63
8.1.160.0070.00722.08
8.1.150.0070.00718.63
8.1.140.0090.00617.39
8.1.130.0030.01017.93
8.1.120.0060.00917.57
8.1.110.0030.00717.57
8.1.100.0000.01017.49
8.1.90.0110.00417.51
8.1.80.0070.00717.45
8.1.70.0130.00017.42
8.1.60.0080.00617.55
8.1.50.0030.01017.47
8.1.40.0070.00317.57
8.1.30.0110.00317.53
8.1.20.0080.00817.68
8.1.10.0070.00417.48
8.1.00.0030.01017.47
8.0.300.0040.00718.77
8.0.290.0090.00916.58
8.0.280.0100.00318.32
8.0.270.0090.00617.04
8.0.260.0100.00316.66
8.0.250.0120.00416.94
8.0.240.0150.00616.92
8.0.230.0070.00316.78
8.0.220.0140.00416.74
8.0.210.0070.00316.82
8.0.200.0070.00316.82
8.0.190.0070.00716.85
8.0.180.0130.00416.81
8.0.170.0170.00016.75
8.0.160.0110.00016.87
8.0.150.0040.01116.68
8.0.140.0170.00316.75
8.0.130.0100.00313.32
8.0.120.0050.00516.79
8.0.110.0080.00316.67
8.0.100.0090.00316.80
8.0.90.0070.00716.69
8.0.80.0170.03016.76
8.0.70.0110.00316.83
8.0.60.0030.00716.61
8.0.50.0060.01216.79
8.0.30.0410.03416.97
8.0.20.0380.03217.40
8.0.10.0100.00016.90
8.0.00.0540.03016.59
7.4.330.0070.00715.00
7.4.320.0030.01316.40
7.4.300.0110.00416.24
7.4.290.0050.00516.52
7.4.280.0100.00316.36
7.4.270.0070.00716.34
7.4.260.0070.00716.41
7.4.250.0100.00316.44
7.4.240.0050.00716.40
7.4.230.0030.00916.57
7.4.220.0200.03016.35
7.4.210.0140.03516.45
7.4.200.0060.00616.22
7.4.190.0060.00616.64
7.4.160.0620.01516.37
7.4.150.0780.03517.40
7.4.140.0530.03717.86
7.4.130.0380.03016.46
7.4.120.0370.02316.50
7.4.110.0430.03316.51
7.4.100.1140.04216.41
7.4.90.0440.03416.51
7.4.80.0340.03419.39
7.4.70.1020.04016.47
7.4.60.0320.04816.57
7.4.50.0070.01416.29
7.4.40.0000.02222.77
7.4.30.0430.02816.40
7.4.00.0100.01614.75
7.3.330.0060.00613.30
7.3.320.0060.00613.06
7.3.310.0030.01016.20
7.3.300.0100.00316.10
7.3.290.0230.04316.20
7.3.280.0190.02416.23
7.3.270.0790.03717.40
7.3.260.0270.04916.49
7.3.250.0590.03316.28
7.3.240.0690.03416.44
7.3.230.0990.04116.39
7.3.210.0520.02616.21
7.3.200.0520.04119.39
7.3.190.0470.01916.24
7.3.180.0310.03116.30
7.3.170.0530.02816.27
7.3.160.0230.04316.32
7.3.120.0260.01114.85
7.2.330.0530.03416.77
7.2.320.0270.03616.69
7.2.310.0280.03116.50
7.2.300.0250.02916.64
7.2.290.0190.03516.46
7.1.100.0170.00717.94
7.1.70.0150.00017.11
7.1.60.0260.01919.82
7.1.50.0200.01317.22
7.0.200.0180.00316.60

preferences:
41.21 ms | 401 KiB | 5 Q