3v4l.org

run code in 300+ PHP versions simultaneously
<?php function CalcularTiempo($Timestamp){ $Segundos = 1453894672 - 1453894620; return intval($Segundos); } function CalcularVelocidad($Distancia, $Tiempo){ $Velocidad = $Distancia / $Tiempo; $Velocidad = $Velocidad * 3.6; return $Velocidad; } function CalcularDistancia($OrigenLat, $OrigenLon, $DestinoLat, $DestinoLon){ $R = 6371; $dLat = ($DestinoLat - $OrigenLat) * (pi() / 180); $dLon = ($DestinoLon - $OrigenLon) * (pi() / 180); $a = sin($dLat / 2) * sin($dLat / 2) + cos($OrigenLat * (pi() / 180)) * cos($DestinoLat * (pi() / 180)) * sin($dLon / 2) * sin($dLon / 2); $c = 2 * atan2(sqrt($a), sqrt(1 - $a)); return ($R * $c) * 1000; } $Tiempo = CalcularTiempo(); $Distancia = CalcularDistancia(38.278096798610605,-0.6911851008339024,38.2788421664234,-0.6901980479164007); $Velocidad = CalcularVelocidad($Distancia, $Tiempo); echo strtotime('now'); ?>

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.0110.01116.38
8.3.60.0170.00318.43
8.3.50.0110.00821.93
8.3.40.0040.01418.79
8.3.30.0040.01118.85
8.3.20.0050.00319.91
8.3.10.0080.00020.65
8.3.00.0080.00020.67
8.2.190.0110.00418.29
8.2.180.0060.01218.31
8.2.170.0170.00322.96
8.2.160.0200.00022.08
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00421.03
8.2.120.0080.00026.35
8.2.110.0030.00620.41
8.2.100.0080.00417.66
8.2.90.0050.00319.02
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0040.00417.91
8.2.50.0080.00018.09
8.2.40.0040.00420.42
8.2.30.0000.00719.45
8.2.20.0030.00517.68
8.2.10.0040.00417.94
8.2.00.0000.00718.00
8.1.280.0140.00025.92
8.1.270.0080.00023.93
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0040.00723.77
8.1.230.0040.00722.69
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0030.00617.23
8.1.190.0050.00317.10
8.1.180.0000.00818.10
8.1.170.0060.00618.51
8.1.160.0040.00420.61
8.1.150.0040.00418.84
8.1.140.0000.00819.56
8.1.130.0040.00417.59
8.1.120.0070.00017.33
8.1.110.0050.00217.43
8.1.100.0000.00717.32
8.1.90.0050.00317.22
8.1.80.0040.00417.38
8.1.70.0000.00717.24
8.1.60.0040.00417.46
8.1.50.0000.00917.46
8.1.40.0040.00817.46
8.1.30.0030.00617.62
8.1.20.0050.00317.38
8.1.10.0000.00817.54
8.1.00.0000.00717.50
8.0.300.0040.00418.77
8.0.290.0030.00616.63
8.0.280.0040.00418.45
8.0.270.0030.00317.21
8.0.260.0030.00317.14
8.0.250.0040.00416.96
8.0.240.0000.00817.01
8.0.230.0040.00416.91
8.0.220.0020.00516.84
8.0.210.0000.00716.88
8.0.200.0030.00317.00
8.0.190.0000.00816.98
8.0.180.0020.00516.95
8.0.170.0070.00016.94
8.0.160.0000.00816.96
8.0.150.0040.00416.88
8.0.140.0000.01116.93
8.0.130.0060.00013.34
8.0.120.0000.00716.84
8.0.110.0000.00816.90
8.0.100.0000.00716.98
8.0.90.0030.00316.88
8.0.80.0060.00916.81
8.0.70.0000.00716.71
8.0.60.0040.00416.80
8.0.50.0040.00416.92
8.0.30.0110.01016.94
8.0.20.0120.00817.40
8.0.10.0000.00716.80
8.0.00.0070.01216.71
7.4.330.0000.00516.79
7.4.320.0060.00016.35
7.4.300.0060.00016.55
7.4.290.0070.00016.36
7.4.280.0000.00816.61
7.4.270.0030.00316.48
7.4.260.0000.00716.46
7.4.250.0070.00016.58
7.4.240.0000.00716.49
7.4.230.0000.00716.60
7.4.220.0090.00916.48
7.4.210.0070.00716.44
7.4.200.0050.00216.68
7.4.160.0050.01016.60
7.4.150.0100.00917.40
7.4.140.0080.01117.86
7.4.130.0100.01016.42
7.4.120.0080.00916.68
7.4.110.0120.00616.64
7.4.100.0090.00916.49
7.4.90.0090.00916.60
7.4.80.0030.01719.39
7.4.70.0130.00316.41
7.4.60.0060.01016.39
7.4.50.0000.01316.45
7.4.40.0100.00716.36
7.4.30.0090.00916.46
7.4.00.0070.00315.09
7.3.330.0000.00513.32
7.3.320.0050.00013.19
7.3.310.0000.00716.32
7.3.300.0040.00416.25
7.3.290.0080.00716.33
7.3.280.0140.00516.30
7.3.270.0030.01417.40
7.3.260.0070.01016.29
7.3.250.0120.00716.35
7.3.240.0080.00916.56
7.3.230.0070.01016.60
7.3.210.0030.01316.50
7.3.200.0150.00916.55
7.3.190.0060.01216.19
7.3.180.0060.00916.34
7.3.170.0030.01216.35
7.3.160.0100.00616.33
7.2.330.0040.01216.22
7.2.320.0060.01616.57
7.2.310.0090.00916.68
7.2.300.0100.00716.47
7.2.290.0100.00616.53
7.2.110.0110.01516.18
7.2.60.0120.00416.73
7.2.00.0030.00719.44
7.1.200.0100.00315.40
7.1.100.0100.00317.65
7.1.70.0000.00916.84
7.1.60.0040.01919.27
7.1.50.0070.01416.89
7.1.00.0030.07722.36
7.0.200.1080.00315.58
7.0.60.0030.08322.00
7.0.50.0030.04718.15
7.0.40.0100.08320.67
7.0.30.0200.04020.40
7.0.20.0330.07020.52
7.0.10.0100.08320.34
7.0.00.0100.07020.33
5.6.280.0000.05021.30
5.6.210.0070.04021.02
5.6.200.0030.05318.48
5.6.190.0130.08320.81
5.6.180.0300.07720.82
5.6.170.0270.04020.78
5.6.160.0000.04320.73
5.6.150.0030.04018.46
5.6.140.0100.07718.42
5.6.130.0000.04718.46
5.6.120.0070.07721.32
5.6.110.0200.07721.42
5.6.100.0100.08021.36
5.6.90.0030.08321.26
5.6.80.0100.08020.73
5.5.350.3330.02720.74
5.5.340.0100.06018.24
5.5.330.0130.08020.57
5.5.320.0430.03720.60
5.5.310.0270.04720.57
5.5.300.0100.07318.23
5.5.290.0100.04318.19
5.5.280.0030.08021.26
5.5.270.0030.05721.17
5.5.260.0100.04021.27
5.5.250.0070.08021.00
5.5.240.0100.07020.57

preferences:
66.24 ms | 401 KiB | 5 Q