3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Fecha = "2016-01-27 12:05:19"; function CalcularTiempo($Timestamp){ //$Segundos = 1453894620 - 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($Fecha); $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.60.0070.01518.81
8.3.50.0040.01118.48
8.3.40.0120.00619.20
8.3.30.0080.00819.23
8.3.20.0040.00420.66
8.3.10.0040.00420.98
8.3.00.0050.00320.96
8.2.180.0040.01418.76
8.2.170.0150.00022.96
8.2.160.0090.00922.63
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0030.00521.42
8.2.120.0080.00026.35
8.2.110.0000.01119.95
8.2.100.0060.00618.30
8.2.90.0000.00819.55
8.2.80.0060.00318.00
8.2.70.0060.00318.00
8.2.60.0000.00818.30
8.2.50.0060.00318.25
8.2.40.0070.00020.74
8.2.30.0040.00419.73
8.2.20.0000.00818.20
8.2.10.0040.00418.45
8.2.00.0070.00018.45
8.1.280.0090.00625.92
8.1.270.0060.00324.30
8.1.260.0000.00828.09
8.1.250.0050.00328.09
8.1.240.0050.00522.77
8.1.230.0110.00018.33
8.1.220.0000.00818.18
8.1.210.0060.01218.77
8.1.200.0120.00017.72
8.1.190.0030.00517.73
8.1.180.0060.00318.10
8.1.170.0020.00819.08
8.1.160.0000.00721.25
8.1.150.0040.00419.22
8.1.140.0000.00819.97
8.1.130.0040.00418.18
8.1.120.0000.00717.88
8.1.110.0000.00717.65
8.1.100.0040.00417.82
8.1.90.0080.00017.85
8.1.80.0050.00217.81
8.1.70.0030.00317.95
8.1.60.0080.00018.07
8.1.50.0040.00417.86
8.1.40.0030.01017.93
8.1.30.0030.00617.98
8.1.20.0080.00017.95
8.1.10.0040.00417.87
8.1.00.0050.00317.97
8.0.300.0040.00418.77
8.0.290.0030.00517.13
8.0.280.0030.00318.81
8.0.270.0020.00517.70
8.0.260.0000.00817.70
8.0.250.0070.00017.34
8.0.240.0000.00717.43
8.0.230.0040.00417.38
8.0.220.0000.00817.31
8.0.210.0020.00517.41
8.0.200.0030.00317.46
8.0.190.0000.00717.46
8.0.180.0070.00017.37
8.0.170.0040.00417.36
8.0.160.0040.00417.37
8.0.150.0000.00817.16
8.0.140.0110.00917.21
8.0.130.0060.00313.82
8.0.120.0000.00817.33
8.0.110.0000.00717.23
8.0.100.0070.00017.21
8.0.90.0050.00217.22
8.0.80.0030.01317.21
8.0.70.0040.00417.09
8.0.60.0030.00517.14
8.0.50.0000.00817.28
8.0.30.0100.01317.44
8.0.20.0120.01017.41
8.0.10.0040.00417.58
8.0.00.0070.01216.76
7.4.330.0000.00517.13
7.4.320.0000.00717.05
7.4.300.0030.00317.18
7.4.290.0030.00317.17
7.4.280.0040.00417.07
7.4.270.0000.00817.01
7.4.260.0030.00717.02
7.4.250.0030.00617.13
7.4.240.0000.00717.09
7.4.230.0070.00017.08
7.4.220.0070.01017.05
7.4.210.0070.00717.05
7.4.200.0070.00017.07
7.4.160.0120.00316.83
7.4.150.0100.00717.40
7.4.140.0100.01017.86
7.4.130.0070.01116.94
7.4.120.0120.00816.98
7.4.110.0100.00717.07
7.4.100.0120.00616.94
7.4.90.0070.01016.96
7.4.80.0150.00619.39
7.4.70.0000.01516.88
7.4.60.0100.00717.07
7.4.50.0030.01417.23
7.4.40.0120.00616.89
7.4.30.0080.00816.85
7.4.00.0060.00915.71
7.3.330.0050.00013.89
7.3.320.0000.00513.97
7.3.310.0070.00016.86
7.3.300.0070.00016.84
7.3.290.0160.01016.80
7.3.280.0110.00716.74
7.3.270.0090.00917.40
7.3.260.0040.01316.94
7.3.250.0160.00516.82
7.3.240.0120.00716.93
7.3.230.0070.01016.92
7.3.210.0170.00017.03
7.3.200.0150.00616.96
7.3.190.0140.00316.81
7.3.180.0090.00616.96
7.3.170.0110.00516.74
7.3.160.0130.00316.89
7.2.330.0120.00616.93
7.2.320.0180.00717.07
7.2.310.0060.01216.79
7.2.300.0030.01317.16
7.2.290.0160.00017.13
7.2.60.0120.00317.20
7.2.00.0100.00320.05
7.1.200.0030.00616.41
7.1.100.0000.01518.64
7.1.70.0070.00317.85
7.1.60.0160.00619.27
7.1.50.0090.01217.46
7.1.00.0070.07322.65
7.0.200.0030.00615.29
7.0.60.0030.07722.01
7.0.50.0030.04318.04
7.0.40.0100.08720.56
7.0.30.0170.04320.46
7.0.20.0170.05020.34
7.0.10.0100.04020.34
7.0.00.0070.06720.30
5.6.280.0070.06021.14
5.6.210.0070.07021.01
5.6.200.0000.06318.41
5.6.190.0100.05320.77
5.6.180.0270.08020.80
5.6.170.0270.05020.73
5.6.160.0070.04320.79
5.6.150.0100.04718.40
5.6.140.0070.04718.44
5.6.130.0070.06718.37
5.6.120.0030.09021.38
5.6.110.0030.04321.26
5.6.100.0070.08321.38
5.6.90.0130.06721.33
5.6.80.0100.05720.68
5.5.350.4230.04020.73
5.5.340.0030.07718.21
5.5.330.0070.07020.62
5.5.320.0230.03720.59
5.5.310.0170.04020.71
5.5.300.0070.05718.23
5.5.290.0100.06318.30
5.5.280.0070.05321.01
5.5.270.0070.05721.15
5.5.260.0030.05021.09
5.5.250.0070.08320.85
5.5.240.0030.03720.46

preferences:
67.2 ms | 401 KiB | 5 Q