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.00718.77
8.3.50.0120.00318.43
8.3.40.0040.01119.21
8.3.30.0110.00419.04
8.3.20.0040.00420.80
8.3.10.0080.00021.06
8.3.00.0080.00021.04
8.2.180.0130.01018.75
8.2.170.0080.00822.96
8.2.160.0130.00722.77
8.2.150.0040.00425.66
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00421.42
8.2.110.0100.00021.25
8.2.100.0030.00818.28
8.2.90.0030.00518.47
8.2.80.0080.00018.66
8.2.70.0030.00718.00
8.2.60.0000.00818.00
8.2.50.0030.00518.00
8.2.40.0040.00421.45
8.2.30.0100.00019.63
8.2.20.0040.00418.37
8.2.10.0040.00418.67
8.2.00.0030.00518.72
8.1.280.0040.01125.92
8.1.270.0080.00024.34
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00624.53
8.1.230.0040.00823.06
8.1.220.0050.00318.14
8.1.210.0030.00519.16
8.1.200.0050.00317.85
8.1.190.0000.00917.72
8.1.180.0060.00318.10
8.1.170.0040.00418.89
8.1.160.0040.00419.20
8.1.150.0040.00420.95
8.1.140.0030.00520.06
8.1.130.0000.00717.93
8.1.120.0070.00017.87
8.1.110.0020.00517.81
8.1.100.0070.00017.75
8.1.90.0050.00317.89
8.1.80.0040.00417.80
8.1.70.0020.00517.89
8.1.60.0040.00418.04
8.1.50.0040.00417.93
8.1.40.0110.00417.94
8.1.30.0000.00818.04
8.1.20.0040.00417.86
8.1.10.0030.00518.09
8.1.00.0050.00217.98
8.0.300.0040.00420.49
8.0.290.0040.00417.25
8.0.280.0000.00718.77
8.0.270.0030.00317.58
8.0.260.0030.00317.62
8.0.250.0000.00717.39
8.0.240.0030.00617.42
8.0.230.0030.00317.36
8.0.220.0030.00317.38
8.0.210.0050.00217.43
8.0.200.0000.00817.39
8.0.190.0040.00417.46
8.0.180.0000.00717.17
8.0.170.0040.00417.32
8.0.160.0000.00717.44
8.0.150.0000.00717.23
8.0.140.0050.00517.36
8.0.130.0000.00513.76
8.0.120.0000.01017.31
8.0.110.0040.00417.38
8.0.100.0030.00517.37
8.0.90.0000.00717.22
8.0.80.0060.01317.03
8.0.70.0040.00417.23
8.0.60.0000.00717.47
8.0.50.0000.00717.13
8.0.30.0050.01217.29
8.0.20.0110.00817.41
8.0.10.0040.00417.41
8.0.00.0070.01016.97
7.4.330.0020.00217.15
7.4.320.0000.00617.14
7.4.300.0040.00417.06
7.4.290.0000.00817.18
7.4.280.0060.00317.05
7.4.270.0000.00717.11
7.4.260.0050.00013.71
7.4.250.0040.00416.90
7.4.240.0040.00417.14
7.4.230.0040.00417.36
7.4.220.0030.01417.03
7.4.210.0120.00316.86
7.4.200.0030.00317.32
7.4.160.0070.00716.90
7.4.150.0100.01017.40
7.4.140.0090.01117.86
7.4.130.0080.00916.96
7.4.120.0130.00516.90
7.4.110.0100.00717.05
7.4.100.0090.00916.80
7.4.90.0130.00316.70
7.4.80.0150.01119.39
7.4.70.0100.00616.80
7.4.60.0030.01316.99
7.4.50.0030.01217.08
7.4.40.0140.00417.08
7.4.30.0070.01016.85
7.4.00.0080.00815.39
7.3.330.0000.00513.88
7.3.320.0000.00514.04
7.3.310.0040.00417.05
7.3.300.0050.00216.97
7.3.290.0090.00916.75
7.3.280.0090.01116.83
7.3.270.0130.00417.40
7.3.260.0140.00316.79
7.3.250.0120.00916.93
7.3.240.0080.00816.92
7.3.230.0130.00316.98
7.3.210.0150.00316.86
7.3.200.0120.00617.08
7.3.190.0080.00816.88
7.3.180.0070.01016.82
7.3.170.0160.00016.98
7.3.160.0130.00316.80
7.3.120.0100.00715.53
7.3.110.0060.01215.50
7.3.100.0100.00315.30
7.3.90.0000.01115.50
7.3.80.0000.00915.48
7.3.70.0090.00315.45
7.3.60.0100.00315.54
7.3.50.0000.00915.50
7.3.40.0030.00715.19
7.3.30.0050.00515.56
7.3.20.0040.00717.39
7.3.10.0100.00617.12
7.3.00.0070.00317.29
7.2.330.0110.00716.77
7.2.320.0260.00617.08
7.2.310.0070.01016.91
7.2.300.0030.01316.89
7.2.290.0100.00716.78
7.2.250.0070.01015.25
7.2.240.0030.01715.65
7.2.230.0030.01015.60
7.2.220.0060.00915.46
7.2.210.0000.01615.73
7.2.200.0030.01015.61
7.2.190.0060.01215.73
7.2.180.0060.00615.60
7.2.170.0040.00815.73
7.2.110.0170.01017.09
7.2.60.0060.01017.69
7.2.00.0120.00619.78
7.1.330.0000.01316.38
7.1.320.0070.00416.11
7.1.310.0070.00416.36
7.1.300.0030.01016.14
7.1.290.0070.00715.96
7.1.280.0090.00316.39
7.1.270.0060.00616.11
7.1.260.0080.00316.36
7.1.200.0070.00716.15
7.1.100.0030.00718.65
7.1.70.0030.00517.80
7.1.60.0070.01419.27
7.1.50.0070.01417.64
7.1.00.0030.07722.68
7.0.200.1260.01015.50
7.0.60.0030.08322.04
7.0.50.0100.04718.04
7.0.40.0100.08320.55
7.0.30.0100.04720.31
7.0.20.0170.05320.41
7.0.10.0170.07720.35
7.0.00.0030.04720.33
5.6.280.0000.05021.21
5.6.210.0070.05320.91
5.6.200.0100.07718.55
5.6.190.0030.06320.77
5.6.180.0200.04720.93
5.6.170.0300.08320.69
5.6.160.0030.06720.89
5.6.150.0000.09018.50
5.6.140.0070.06318.54
5.6.130.0100.03718.60
5.6.120.0030.04321.28
5.6.110.0000.04321.25
5.6.100.0070.09021.41
5.6.90.0200.04721.30
5.6.80.0130.03720.74
5.5.350.3200.04020.64
5.5.340.0170.06018.30
5.5.330.0000.06720.82
5.5.320.0130.04720.69
5.5.310.0170.04020.53
5.5.300.0070.04718.23
5.5.290.0100.08018.20
5.5.280.0030.05021.16
5.5.270.0100.08021.11
5.5.260.0100.07321.02
5.5.250.0130.04720.83
5.5.240.0070.04720.53

preferences:
56.02 ms | 400 KiB | 5 Q