3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Fecha = 1453892442; function CalcularTiempo($Timestamp){ $Segundos = strtotime('now') - strtotime($Timestamp); return $Segundos; } function CalcularVelocidad($Distancia, $Tiempo){ return $Distancia / $Tiempo; } 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 $Tiempo; ?>

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.0030.01319.02
8.3.50.0190.00322.30
8.3.40.0070.00719.38
8.3.30.0100.01019.30
8.3.20.0070.00020.69
8.3.10.0090.00021.16
8.3.00.0030.00521.05
8.2.180.0120.00318.67
8.2.170.0110.00722.96
8.2.160.0040.01122.32
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0030.00721.42
8.2.120.0040.00426.35
8.2.110.0090.00021.42
8.2.100.0030.01018.43
8.2.90.0040.00419.57
8.2.80.0060.00318.48
8.2.70.0050.00318.12
8.2.60.0040.00418.43
8.2.50.0090.00518.12
8.2.40.0050.00320.89
8.2.30.0080.00319.86
8.2.20.0000.00818.60
8.2.10.0040.00418.62
8.2.00.0050.00318.58
8.1.280.0140.00725.92
8.1.270.0060.00324.25
8.1.260.0050.00328.09
8.1.250.0000.00928.09
8.1.240.0090.00022.96
8.1.230.0040.00818.14
8.1.220.0030.00518.18
8.1.210.0000.00818.77
8.1.200.0100.00017.85
8.1.190.0040.00417.85
8.1.180.0000.00918.10
8.1.170.0040.00419.00
8.1.160.0040.00421.14
8.1.150.0040.00419.32
8.1.140.0030.00619.96
8.1.130.0000.00718.06
8.1.120.0070.00018.09
8.1.110.0000.00718.10
8.1.100.0050.00317.88
8.1.90.0040.00418.03
8.1.80.0000.00717.86
8.1.70.0030.00518.05
8.1.60.0000.00818.10
8.1.50.0040.00417.96
8.1.40.0110.00017.98
8.1.30.0060.00318.21
8.1.20.0000.00818.11
8.1.10.0030.00517.99
8.1.00.0000.00817.96
8.0.300.0030.00618.77
8.0.290.0040.00417.50
8.0.280.0030.00318.84
8.0.270.0080.00017.71
8.0.260.0060.00317.68
8.0.250.0030.00317.75
8.0.240.0030.00317.57
8.0.230.0030.00317.60
8.0.220.0000.00817.66
8.0.210.0090.00017.62
8.0.200.0060.00017.59
8.0.190.0000.00717.71
8.0.180.0080.00017.46
8.0.170.0050.00617.58
8.0.160.0050.00317.42
8.0.150.0040.00417.40
8.0.140.0000.00717.52
8.0.130.0000.00613.95
8.0.120.0080.00017.48
8.0.110.0080.00017.55
8.0.100.0040.00417.38
8.0.90.0060.00317.32
8.0.80.0030.01217.34
8.0.70.0000.00717.43
8.0.60.0000.00717.32
8.0.50.0040.00417.45
8.0.30.0070.01217.49
8.0.20.0100.01017.53
8.0.10.0040.00417.83
8.0.00.0100.00717.26
7.4.330.0050.00017.24
7.4.320.0000.00617.13
7.4.300.0060.00017.09
7.4.290.0000.00717.12
7.4.280.0000.00717.04
7.4.270.0030.00317.15
7.4.260.0000.00717.12
7.4.250.0000.00817.15
7.4.240.0000.00717.05
7.4.230.0070.00016.92
7.4.220.0100.00716.84
7.4.210.0080.00616.88
7.4.200.0000.00717.09
7.4.160.0110.00816.77
7.4.150.0140.00417.40
7.4.140.0100.01217.86
7.4.130.0130.00516.92
7.4.120.0100.00916.86
7.4.110.0100.00717.16
7.4.100.0070.01016.96
7.4.90.0070.01116.99
7.4.80.0140.00419.39
7.4.70.0090.00916.97
7.4.60.0090.00917.00
7.4.50.0030.01016.98
7.4.40.0100.00716.77
7.4.30.0090.00916.78
7.4.00.0000.01415.48
7.3.330.0050.00013.71
7.3.320.0030.00313.90
7.3.310.0030.00316.91
7.3.300.0050.00216.96
7.3.290.0140.00616.72
7.3.280.0130.00616.72
7.3.270.0040.01417.40
7.3.260.0120.00617.06
7.3.250.0110.00816.77
7.3.240.0050.01217.03
7.3.230.0080.00916.77
7.3.210.0140.00416.88
7.3.200.0070.01016.85
7.3.190.0080.00817.08
7.3.180.0060.01016.64
7.3.170.0000.02116.82
7.3.160.0080.00816.70
7.3.10.0150.00716.99
7.3.00.0210.00716.83
7.2.330.0040.01317.15
7.2.320.0060.01517.03
7.2.310.0030.01317.15
7.2.300.0060.00917.07
7.2.290.0120.00617.07
7.2.130.0210.00517.00
7.2.120.0150.01217.21
7.2.110.0410.00616.97
7.2.100.0170.00916.81
7.2.90.0170.00617.07
7.2.80.0190.00317.05
7.2.70.0220.00317.12
7.2.60.0070.01317.51
7.2.50.0150.01217.25
7.2.40.0120.01217.11
7.2.30.0230.01017.00
7.2.20.0260.00616.68
7.2.10.0140.01116.87
7.2.00.0090.01218.64
7.1.250.0110.01116.12
7.1.200.0060.00616.37
7.1.100.0040.00718.52
7.1.70.0070.00417.69
7.1.60.0130.01319.27
7.1.50.0060.00617.27
7.1.00.0070.07322.57
7.0.200.0320.00415.04
7.0.60.0100.03722.09
7.0.50.0100.03318.13
7.0.40.0030.04320.43
7.0.30.0270.04720.40
7.0.20.0330.08320.52
7.0.10.0070.08320.41
7.0.00.0070.05320.37
5.6.280.0000.07321.21
5.6.210.0170.04020.93
5.6.200.0030.08318.50
5.6.190.0130.07720.73
5.6.180.0300.06720.77
5.6.170.0200.06720.89
5.6.160.0070.08720.77
5.6.150.0030.05718.45
5.6.140.0100.07318.41
5.6.130.0070.05018.46
5.6.120.0170.07321.35
5.6.110.0030.07721.35
5.6.100.0000.07021.37
5.6.90.0230.06721.23
5.6.80.0030.04020.74
5.5.350.4170.04320.77
5.5.340.0170.07018.26
5.5.330.0000.05020.57
5.5.320.0330.08320.69
5.5.310.0230.04720.68
5.5.300.0070.04018.27
5.5.290.0070.07318.21
5.5.280.0170.07721.09
5.5.270.0030.04021.17
5.5.260.0100.08021.16
5.5.250.0130.04020.95
5.5.240.0000.07720.52

preferences:
58.41 ms | 401 KiB | 5 Q