3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Fecha = "2016-01-27 11:50:19"; function CalcularTiempo($Timestamp){ $Segundos = strtotime('now') - strtotime($Timestamp); return intval($Segundos); } function CalcularVelocidad($Distancia, $Tiempo){ $salida = $Distancia / $Tiempo; return $salida / 60; } 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($Fecha); $Distancia = CalcularDistancia(38.278096798610605,-0.6911851008339024,38.2788421664234,-0.6901980479164007); $Velocidad = CalcularVelocidad($Distancia, $Tiempo); echo $Velocidad; echo '\n'; ?>

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.01118.93
8.3.50.0150.00522.30
8.3.40.0070.01419.33
8.3.30.0120.00319.39
8.3.20.0040.00420.84
8.3.10.0040.00421.34
8.3.00.0080.00021.02
8.2.180.0060.00919.04
8.2.170.0120.00622.96
8.2.160.0140.00322.48
8.2.150.0040.00424.18
8.2.140.0030.00724.66
8.2.130.0070.00726.16
8.2.120.0070.00021.17
8.2.110.0030.00621.33
8.2.100.0080.00418.54
8.2.90.0030.00619.66
8.2.80.0080.00017.99
8.2.70.0030.00618.25
8.2.60.0080.00018.43
8.2.50.0000.00818.12
8.2.40.0000.00820.94
8.2.30.0080.00020.01
8.2.20.0050.00218.31
8.2.10.0040.00418.65
8.2.00.0070.00018.51
8.1.280.0100.00725.92
8.1.270.0090.00024.34
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00422.80
8.1.230.0080.00318.20
8.1.220.0030.00518.29
8.1.210.0000.00818.77
8.1.200.0070.00317.86
8.1.190.0030.00517.85
8.1.180.0030.00518.10
8.1.170.0060.00618.87
8.1.160.0000.00821.13
8.1.150.0040.00421.23
8.1.140.0000.00819.94
8.1.130.0030.00518.05
8.1.120.0000.00718.10
8.1.110.0040.00417.89
8.1.100.0000.00718.07
8.1.90.0000.00718.08
8.1.80.0040.00417.90
8.1.70.0030.00317.98
8.1.60.0000.00818.18
8.1.50.0060.00318.05
8.1.40.0090.00318.16
8.1.30.0080.00018.09
8.1.20.0000.00718.11
8.1.10.0030.00518.12
8.1.00.0040.00418.07
8.0.300.0080.00018.77
8.0.290.0040.00417.38
8.0.280.0000.00718.94
8.0.270.0050.00217.79
8.0.260.0060.00017.79
8.0.250.0060.00017.62
8.0.240.0030.00317.60
8.0.230.0040.00417.65
8.0.220.0000.00817.43
8.0.210.0000.00817.50
8.0.200.0000.00817.47
8.0.190.0060.00317.59
8.0.180.0070.00017.50
8.0.170.0040.00417.36
8.0.160.0070.00017.47
8.0.150.0000.00717.43
8.0.140.0050.00317.27
8.0.130.0030.00313.87
8.0.120.0000.00917.44
8.0.110.0040.00417.32
8.0.100.0000.00717.40
8.0.90.0070.00017.41
8.0.80.0040.01417.25
8.0.70.0000.00717.29
8.0.60.0040.00417.48
8.0.50.0040.00417.41
8.0.30.0120.00617.26
8.0.20.0080.01017.47
8.0.10.0000.00817.47
8.0.00.0110.00717.14
7.4.330.0030.00317.11
7.4.320.0070.00017.07
7.4.300.0060.00017.18
7.4.290.0070.00017.08
7.4.280.0050.00217.18
7.4.270.0000.00717.15
7.4.260.0050.00316.98
7.4.250.0040.00416.94
7.4.240.0080.00017.21
7.4.230.0030.00517.00
7.4.220.0100.01716.95
7.4.210.0130.00716.98
7.4.200.0070.00017.20
7.4.160.0040.01116.83
7.4.150.0150.00317.40
7.4.140.0180.00317.86
7.4.130.0080.00817.00
7.4.120.0080.00916.94
7.4.110.0090.01516.76
7.4.100.0110.00716.94
7.4.90.0150.00316.88
7.4.80.0070.01619.39
7.4.70.0080.00816.73
7.4.60.0080.00816.86
7.4.50.0080.00317.34
7.4.40.0100.00717.00
7.4.30.0130.00316.95
7.4.00.0080.00615.54
7.3.330.0000.00613.92
7.3.320.0000.00513.88
7.3.310.0030.00316.96
7.3.300.0070.00016.82
7.3.290.0080.00716.70
7.3.280.0100.00916.74
7.3.270.0130.00717.40
7.3.260.0140.00316.88
7.3.250.0080.01216.90
7.3.240.0050.01216.99
7.3.230.0130.00617.13
7.3.210.0070.01116.76
7.3.200.0080.01516.96
7.3.190.0060.01216.86
7.3.180.0100.00616.61
7.3.170.0060.01316.84
7.3.160.0070.01016.84
7.2.330.0180.00317.09
7.2.320.0060.01516.87
7.2.310.0090.00917.20
7.2.300.0130.00316.99
7.2.290.0120.00416.92
7.2.60.0060.00917.46
7.2.50.0130.00317.60
7.1.200.0000.01416.48
7.1.70.0000.00717.97
7.1.60.0160.01019.27
7.1.50.0100.01317.77
7.1.00.0030.07722.68
7.0.200.0370.00915.19
7.0.60.0070.08021.93
7.0.50.0000.06718.15
7.0.40.0170.07720.40
7.0.30.0270.04720.49
7.0.20.0300.06020.31
7.0.10.0100.05020.55
7.0.00.0030.07320.44
5.6.280.0030.07021.36
5.6.210.0070.09320.92
5.6.200.0070.04318.49
5.6.190.0070.09020.65
5.6.180.0330.05320.65
5.6.170.0330.05720.80
5.6.160.0130.07020.79
5.6.150.0100.08018.42
5.6.140.0100.07718.39
5.6.130.0100.04018.40
5.6.120.0070.08021.34
5.6.110.0000.04321.31
5.6.100.0130.07721.37
5.6.90.0130.07021.31
5.6.80.0130.06320.78
5.5.350.4400.03020.70
5.5.340.0070.07318.27
5.5.330.0070.08720.63
5.5.320.0270.03720.59
5.5.310.0300.07320.70
5.5.300.0100.07718.32
5.5.290.0000.04318.23
5.5.280.0130.07721.18
5.5.270.0100.07721.24
5.5.260.0170.04021.00
5.5.250.0130.07320.80
5.5.240.0130.06320.66

preferences:
55.57 ms | 401 KiB | 5 Q