3v4l.org

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

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.0100.01418.68
8.3.50.0130.00918.55
8.3.40.0090.00619.25
8.3.30.0070.00719.05
8.3.20.0040.00420.78
8.3.10.0040.00421.11
8.3.00.0040.00421.09
8.2.180.0140.00018.75
8.2.170.0070.00722.96
8.2.160.0060.00922.49
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00021.42
8.2.120.0030.00526.35
8.2.110.0000.01022.62
8.2.100.0120.00018.53
8.2.90.0040.00419.55
8.2.80.0030.00618.38
8.2.70.0040.00418.25
8.2.60.0040.00418.43
8.2.50.0060.00318.38
8.2.40.0040.00420.92
8.2.30.0060.00319.80
8.2.20.0030.00518.30
8.2.10.0070.00018.60
8.2.00.0040.00418.68
8.1.270.0070.00724.26
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0030.00724.29
8.1.230.0040.00818.08
8.1.220.0050.00318.14
8.1.210.0050.00318.77
8.1.200.0030.00717.75
8.1.190.0000.00817.85
8.1.180.0030.00518.10
8.1.170.0040.00419.01
8.1.160.0040.00421.25
8.1.150.0040.00421.08
8.1.140.0000.00920.01
8.1.130.0070.00018.12
8.1.120.0040.00418.07
8.1.110.0000.00717.95
8.1.100.0040.00417.89
8.1.90.0040.00417.95
8.1.80.0040.00417.96
8.1.70.0000.00718.06
8.1.60.0000.00818.18
8.1.50.0030.00518.14
8.1.40.0110.00017.97
8.1.30.0050.00318.25
8.1.20.0070.00018.02
8.1.10.0050.00317.92
8.1.00.0000.00717.89
8.0.300.0030.00518.77
8.0.290.0000.00817.38
8.0.280.0000.00818.88
8.0.270.0000.00817.81
8.0.260.0060.00017.79
8.0.250.0040.00417.63
8.0.240.0030.00317.61
8.0.230.0030.00317.61
8.0.220.0040.00417.48
8.0.210.0080.00017.41
8.0.200.0000.00817.50
8.0.190.0050.00317.67
8.0.180.0040.00417.55
8.0.170.0070.00317.55
8.0.160.0040.00417.41
8.0.150.0040.00417.56
8.0.140.0070.00017.48
8.0.130.0000.00513.91
8.0.120.0000.00817.39
8.0.110.0030.00517.42
8.0.100.0000.00817.40
8.0.90.0000.00817.43
8.0.80.0090.00617.25
8.0.70.0000.00817.36
8.0.60.0000.00817.70
8.0.50.0050.00317.31
8.0.30.0070.01017.55
8.0.20.0090.01217.64
8.0.10.0050.00217.58
8.0.00.0070.01017.18
7.4.330.0050.00017.18
7.4.320.0000.00716.99
7.4.300.0040.00417.20
7.4.290.0070.00017.20
7.4.280.0040.00416.88
7.4.270.0000.00717.15
7.4.260.0050.00517.09
7.4.250.0060.00317.17
7.4.240.0070.00016.96
7.4.230.0070.00017.20
7.4.220.0030.01516.80
7.4.210.0090.00916.90
7.4.200.0040.00416.93
7.4.160.0100.00717.00
7.4.150.0120.00617.40
7.4.140.0050.01217.86
7.4.130.0060.01216.81
7.4.120.0150.00316.95
7.4.110.0100.01416.91
7.4.100.0090.00916.83
7.4.90.0090.00917.02
7.4.80.0100.00919.39
7.4.70.0060.00916.96
7.4.60.0030.01316.97
7.4.50.0080.01117.16
7.4.40.0060.01216.99
7.4.30.0060.01316.67
7.4.00.0070.01015.62
7.3.330.0000.00613.91
7.3.320.0000.00813.89
7.3.310.0030.00316.88
7.3.300.0070.00016.86
7.3.290.0100.00616.71
7.3.280.0090.00716.71
7.3.270.0100.01017.40
7.3.260.0110.00616.88
7.3.240.0080.01116.94
7.3.230.0060.01216.96
7.3.210.0180.00317.02
7.3.200.0070.01016.84
7.3.190.0060.01016.91
7.3.180.0160.00016.96
7.3.170.0070.01116.91
7.3.160.0120.00616.96
7.2.330.0040.01517.20
7.2.320.0130.01017.13
7.2.310.0170.00317.17
7.2.300.0030.01416.95
7.2.290.0120.00916.80
7.2.110.0190.00617.29
7.2.60.0070.00717.68
7.2.00.0030.00620.05
7.1.200.0080.00316.39
7.1.100.0080.00018.33
7.1.70.0000.01017.85
7.1.60.0060.01919.27
7.1.50.0030.01017.65
7.1.00.0030.09322.75
7.0.200.0530.00015.32
7.0.60.0000.05022.00
7.0.50.0000.04318.06
7.0.40.0030.04320.43
7.0.30.0370.06320.33
7.0.20.0300.05320.52
7.0.10.0100.08720.44
7.0.00.0070.08720.39
5.6.280.0030.05021.06
5.6.210.0070.06021.06
5.6.200.0130.05718.54
5.6.190.0100.07721.02
5.6.180.0270.08720.86
5.6.170.0270.08320.78
5.6.160.0100.05720.71
5.6.150.0070.05018.52
5.6.140.0000.05318.44
5.6.130.0030.08318.52
5.6.120.0100.03721.34
5.6.110.0100.08321.30
5.6.100.0100.08321.37
5.6.90.0130.08021.32
5.6.80.0030.04020.66
5.5.350.0300.07720.62
5.5.340.0100.04018.24
5.5.330.0100.03720.60
5.5.320.0330.05020.70
5.5.310.0170.05320.49
5.5.300.0130.07018.27
5.5.290.0070.05318.16
5.5.280.0030.06021.17
5.5.270.0100.04021.03
5.5.260.0030.08721.18
5.5.250.0170.05720.82
5.5.240.0030.08720.55

preferences:
63.54 ms | 400 KiB | 5 Q