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.0170.00718.80
8.3.50.0090.00618.93
8.3.40.0070.01019.65
8.3.30.0000.01519.33
8.3.20.0040.00420.85
8.3.10.0080.00021.14
8.3.00.0040.00421.21
8.2.180.0110.00418.66
8.2.170.0040.01822.96
8.2.160.0100.00322.46
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0030.00521.32
8.2.120.0090.00026.35
8.2.110.0090.00021.47
8.2.100.0040.00818.43
8.2.90.0030.00519.72
8.2.80.0040.00418.13
8.2.70.0030.00618.00
8.2.60.0000.00818.30
8.2.50.0000.01018.13
8.2.40.0000.00920.92
8.2.30.0030.00619.89
8.2.20.0000.00818.37
8.2.10.0000.00718.62
8.2.00.0030.00818.79
8.1.280.0070.00725.92
8.1.270.0180.00024.21
8.1.260.0060.00328.09
8.1.250.0040.00428.09
8.1.240.0080.00617.98
8.1.230.0000.01118.20
8.1.220.0030.00618.17
8.1.210.0050.00318.77
8.1.200.0030.00618.10
8.1.190.0040.00417.75
8.1.180.0040.00418.10
8.1.170.0000.00819.09
8.1.160.0020.00521.09
8.1.150.0040.00419.30
8.1.140.0000.00820.07
8.1.130.0000.00718.12
8.1.120.0030.00418.09
8.1.110.0000.00718.07
8.1.100.0080.00018.01
8.1.90.0040.00418.12
8.1.80.0000.00718.02
8.1.70.0080.00018.10
8.1.60.0060.00318.21
8.1.50.0030.00618.08
8.1.40.0000.01017.96
8.1.30.0000.00818.27
8.1.20.0080.00018.05
8.1.10.0080.00018.11
8.1.00.0030.00618.10
8.0.300.0040.00418.77
8.0.290.0040.00417.50
8.0.280.0000.00819.00
8.0.270.0030.00317.74
8.0.260.0060.00017.90
8.0.250.0060.00017.52
8.0.240.0030.00317.54
8.0.230.0030.00317.70
8.0.220.0030.00317.46
8.0.210.0040.00417.39
8.0.200.0060.00017.72
8.0.190.0070.00017.67
8.0.180.0030.00517.57
8.0.170.0080.00017.52
8.0.160.0030.00317.58
8.0.150.0020.00517.39
8.0.140.0000.00817.53
8.0.130.0030.00313.90
8.0.120.0030.00517.50
8.0.110.0040.00417.58
8.0.100.0050.00217.32
8.0.90.0040.00417.43
8.0.80.0060.01017.32
8.0.70.0070.00017.52
8.0.60.0040.00417.57
8.0.50.0080.00017.53
8.0.30.0120.00717.46
8.0.20.0100.00917.55
8.0.10.0040.00417.68
8.0.00.0100.00917.30
7.4.330.0000.00517.13
7.4.320.0030.00317.19
7.4.300.0000.00717.07
7.4.290.0000.00717.24
7.4.280.0000.00717.17
7.4.270.0000.00717.07
7.4.260.0040.00417.08
7.4.250.0000.00817.16
7.4.240.0040.00417.14
7.4.230.0040.00216.88
7.4.220.0090.00916.98
7.4.210.0150.00617.08
7.4.200.0050.00217.18
7.4.160.0080.00816.88
7.4.150.0130.00717.40
7.4.140.0150.00717.86
7.4.130.0130.00416.89
7.4.120.0110.01017.00
7.4.110.0130.00316.71
7.4.100.0090.00916.79
7.4.90.0090.00916.95
7.4.80.0060.01719.39
7.4.70.0030.01316.86
7.4.60.0080.00816.85
7.4.50.0120.00016.94
7.4.40.0100.00716.70
7.4.30.0110.00717.25
7.4.00.0100.00715.54
7.3.330.0030.00313.67
7.3.320.0070.00013.81
7.3.310.0030.00316.77
7.3.300.0030.00316.99
7.3.290.0110.00516.75
7.3.280.0100.00916.74
7.3.270.0090.00917.40
7.3.260.0090.00916.69
7.3.240.0100.00917.00
7.3.230.0080.00816.99
7.3.210.0140.00316.88
7.3.200.0060.00917.14
7.3.190.0100.00716.84
7.3.180.0060.01016.93
7.3.170.0070.01016.92
7.3.160.0150.00016.70
7.2.330.0170.00016.91
7.2.320.0110.00717.09
7.2.310.0140.00317.09
7.2.300.0100.00717.09
7.2.290.0210.01016.89
7.2.110.0190.00917.20
7.2.60.0090.00617.48
7.2.00.0030.00919.90
7.1.200.0030.00716.03
7.1.100.0080.00418.77
7.1.70.0050.00517.44
7.1.60.0160.00719.27
7.1.50.0040.01817.72
7.1.00.0070.07322.85
7.0.200.0290.00715.36
7.0.60.0000.08322.12
7.0.50.0030.04718.18
7.0.40.0130.04320.44
7.0.30.0270.06020.35
7.0.20.0370.05320.33
7.0.10.0100.08720.45
7.0.00.0000.09320.36
5.6.280.0000.04021.18
5.6.210.0170.04321.00
5.6.200.0170.07318.50
5.6.190.0070.08020.73
5.6.180.0200.05020.80
5.6.170.0300.06320.78
5.6.160.0100.08020.73
5.6.150.0100.07718.60
5.6.140.0130.07318.59
5.6.130.0130.08018.47
5.6.120.0100.06721.34
5.6.110.0000.04321.41
5.6.100.0070.08321.34
5.6.90.0070.08321.26
5.6.80.0070.06020.68
5.5.350.4430.03320.68
5.5.340.0100.07718.17
5.5.330.0100.05020.54
5.5.320.0330.05020.51
5.5.310.0230.05020.48
5.5.300.0070.05718.29
5.5.290.0000.04318.39
5.5.280.0100.08321.12
5.5.270.0070.04021.17
5.5.260.0100.07721.02
5.5.250.0070.04020.99
5.5.240.0030.08020.55

preferences:
45.22 ms | 401 KiB | 5 Q