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 $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.0130.01018.93
8.3.50.0080.00818.55
8.3.40.0070.01119.59
8.3.30.0090.00619.42
8.3.20.0000.00820.74
8.3.10.0040.00421.14
8.3.00.0080.00021.08
8.2.180.0150.00719.05
8.2.170.0070.00722.96
8.2.160.0100.00722.29
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00321.41
8.2.120.0070.00026.35
8.2.110.0070.00421.42
8.2.100.0030.00818.34
8.2.90.0030.00618.34
8.2.80.0000.00818.53
8.2.70.0000.00918.13
8.2.60.0040.00418.66
8.2.50.0040.00818.38
8.2.40.0060.00320.92
8.2.30.0000.00920.09
8.2.20.0080.00018.27
8.2.10.0000.00718.52
8.2.00.0050.00518.55
8.1.280.0000.01425.92
8.1.270.0070.01124.21
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0060.00324.30
8.1.230.0060.00621.32
8.1.220.0040.00418.28
8.1.210.0090.00019.22
8.1.200.0030.00617.86
8.1.190.0030.00617.85
8.1.180.0050.00318.10
8.1.170.0070.00319.07
8.1.160.0000.00721.22
8.1.150.0040.00419.35
8.1.140.0040.00420.01
8.1.130.0030.00318.14
8.1.120.0000.00718.05
8.1.110.0060.00318.05
8.1.100.0070.00018.03
8.1.90.0040.00417.93
8.1.80.0000.00717.95
8.1.70.0040.00418.00
8.1.60.0090.00018.16
8.1.50.0030.00518.12
8.1.40.0110.00018.10
8.1.30.0030.00618.26
8.1.20.0080.00018.10
8.1.10.0070.00018.13
8.1.00.0040.00417.96
8.0.300.0000.00720.50
8.0.290.0000.00717.38
8.0.280.0070.00019.08
8.0.270.0030.00317.70
8.0.260.0030.00317.70
8.0.250.0080.00017.67
8.0.240.0000.00717.58
8.0.230.0000.00717.67
8.0.220.0000.00717.61
8.0.210.0040.00317.42
8.0.200.0000.00817.54
8.0.190.0020.00517.71
8.0.180.0040.00417.42
8.0.170.0030.00817.60
8.0.160.0000.00717.47
8.0.150.0000.00817.45
8.0.140.0040.00417.53
8.0.130.0060.00013.96
8.0.120.0000.00917.54
8.0.110.0000.00817.39
8.0.100.0040.00417.38
8.0.90.0000.00817.41
8.0.80.0060.01017.24
8.0.70.0070.00017.59
8.0.60.0030.00517.54
8.0.50.0070.00017.63
8.0.30.0090.00917.46
8.0.20.0120.00717.52
8.0.10.0030.00517.54
8.0.00.0070.01517.18
7.4.330.0030.00317.23
7.4.320.0000.00717.21
7.4.300.0000.00716.99
7.4.290.0070.00017.13
7.4.280.0040.00417.16
7.4.270.0070.00017.17
7.4.260.0050.00316.97
7.4.250.0000.00816.95
7.4.240.0000.00717.11
7.4.230.0000.00817.16
7.4.220.0210.00616.95
7.4.210.0070.01316.99
7.4.200.0000.00717.12
7.4.160.0000.01716.93
7.4.150.0060.01117.40
7.4.140.0140.01417.86
7.4.130.0120.01016.96
7.4.120.0140.00516.88
7.4.110.0070.01016.71
7.4.100.0110.00616.92
7.4.90.0070.01016.95
7.4.80.0060.01219.39
7.4.70.0090.00616.88
7.4.60.0080.00817.01
7.4.50.0030.01316.95
7.4.40.0100.01016.90
7.4.30.0110.00616.74
7.4.00.0080.01015.82
7.3.330.0070.00013.76
7.3.320.0070.00013.74
7.3.310.0000.00816.81
7.3.300.0000.00716.77
7.3.290.0090.00616.69
7.3.280.0080.00816.67
7.3.270.0090.00917.40
7.3.260.0120.00916.89
7.3.250.0080.00916.85
7.3.240.0110.00716.80
7.3.230.0030.01416.85
7.3.210.0060.01016.85
7.3.200.0060.00916.85
7.3.190.0100.00617.11
7.3.180.0090.00616.93
7.3.170.0060.01316.80
7.3.160.0090.00616.89
7.3.120.0080.00815.29
7.3.110.0080.00815.63
7.3.100.0020.01515.47
7.3.90.0050.01015.67
7.3.80.0030.01215.54
7.3.70.0090.00315.39
7.3.60.0070.00815.34
7.3.50.0000.01415.60
7.3.40.0080.00515.52
7.3.30.0050.00715.60
7.3.20.0070.00417.13
7.3.10.0050.00917.43
7.3.00.0060.00717.12
7.2.330.0040.01316.81
7.2.320.0110.00817.18
7.2.310.0100.00617.09
7.2.300.0130.00317.17
7.2.290.0040.01517.16
7.2.250.0080.01115.94
7.2.240.0070.01115.73
7.2.230.0070.01015.84
7.2.220.0050.00915.65
7.2.210.0090.00715.56
7.2.200.0040.00915.52
7.2.190.0060.00515.34
7.2.180.0050.00815.64
7.2.170.0080.00815.46
7.2.160.0040.01115.47
7.2.150.0070.00717.55
7.2.140.0030.01017.37
7.2.130.0090.00917.45
7.2.120.0090.00617.53
7.2.110.0090.00617.26
7.2.100.0030.00717.37
7.2.90.0040.00817.57
7.2.80.0050.00517.59
7.2.70.0100.00017.55
7.2.60.0070.01017.59
7.2.50.0120.00317.36
7.2.40.0100.00617.68
7.2.30.0030.01417.70
7.2.20.0100.00717.20
7.2.10.0030.00617.52
7.2.00.0040.00918.70
7.1.330.0020.01216.54
7.1.320.0020.01116.27
7.1.310.0050.00716.53
7.1.300.0050.00516.33
7.1.290.0090.00516.53
7.1.280.0010.00716.21
7.1.270.0030.00816.43
7.1.260.0050.00616.29
7.1.250.0090.00616.36
7.1.200.0080.00616.57
7.1.100.0030.00618.97
7.1.70.0000.01017.89
7.1.60.0060.01819.27
7.1.50.0130.00617.77
7.1.00.0000.08022.64
7.0.200.0500.00615.39
7.0.60.0030.04322.07
7.0.50.0030.04018.04
7.0.40.0100.03720.43
7.0.30.0230.05020.51
7.0.20.0300.06320.38
7.0.10.0070.09020.38
7.0.00.0100.06720.41
5.6.280.0070.04321.37
5.6.210.0130.07320.86
5.6.200.0070.09018.48
5.6.190.0070.08020.80
5.6.180.0300.07720.82
5.6.170.0330.08320.72
5.6.160.0130.08020.69
5.6.150.0030.08318.43
5.6.140.0030.08018.36
5.6.130.0070.08318.54
5.6.120.0070.04321.28
5.6.110.0030.05721.34
5.6.100.0070.05321.33
5.6.90.0130.07721.33
5.6.80.0030.04020.67
5.5.350.0370.07020.72
5.5.340.0100.07718.20
5.5.330.0000.04720.57
5.5.320.0400.06720.52
5.5.310.0330.06020.49
5.5.300.0030.04318.20
5.5.290.0170.07018.20
5.5.280.0070.06721.05
5.5.270.0100.04321.27
5.5.260.0300.06021.26
5.5.250.0100.08020.94
5.5.240.0030.07320.57

preferences:
32 ms | 400 KiB | 5 Q