3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Fecha = "2016-01-27 11:34:19"; 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.0190.00318.93
8.3.50.0030.01618.81
8.3.40.0090.00619.31
8.3.30.0130.00619.21
8.3.20.0000.00720.71
8.3.10.0080.00021.21
8.3.00.0040.00421.02
8.2.180.0150.00619.04
8.2.170.0110.00422.96
8.2.160.0120.00322.45
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0030.00621.48
8.2.120.0060.00326.35
8.2.110.0000.01121.46
8.2.100.0080.00418.41
8.2.90.0080.00019.67
8.2.80.0040.00418.13
8.2.70.0000.00818.25
8.2.60.0050.00318.54
8.2.50.0110.00018.09
8.2.40.0080.00020.92
8.2.30.0000.00919.80
8.2.20.0040.00418.31
8.2.10.0030.00518.56
8.2.00.0000.00718.63
8.1.270.0110.00724.01
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0090.00022.85
8.1.230.0060.00618.20
8.1.220.0030.00518.14
8.1.210.0030.00518.77
8.1.200.0060.00317.98
8.1.190.0000.00817.75
8.1.180.0080.00018.10
8.1.170.0050.00318.77
8.1.160.0040.00421.16
8.1.150.0040.00419.22
8.1.140.0060.00320.07
8.1.130.0040.00418.14
8.1.120.0040.00417.96
8.1.110.0000.00718.10
8.1.100.0030.00517.92
8.1.90.0050.00317.97
8.1.80.0000.00718.06
8.1.70.0030.00317.95
8.1.60.0000.00718.16
8.1.50.0040.00418.09
8.1.40.0060.00618.04
8.1.30.0040.00418.09
8.1.20.0030.00518.13
8.1.10.0040.00418.10
8.1.00.0030.00517.93
8.0.300.0000.00918.77
8.0.290.0040.00417.25
8.0.280.0050.00218.94
8.0.270.0070.00017.76
8.0.260.0000.00717.71
8.0.250.0000.00717.59
8.0.240.0030.00317.43
8.0.230.0000.00717.60
8.0.220.0030.00317.45
8.0.210.0000.00717.55
8.0.200.0030.00317.63
8.0.190.0070.00017.60
8.0.180.0040.00417.55
8.0.170.0040.00717.55
8.0.160.0070.00017.54
8.0.150.0040.00417.46
8.0.140.0040.00417.40
8.0.130.0030.00313.84
8.0.120.0040.00417.29
8.0.110.0020.00517.47
8.0.100.0070.00017.50
8.0.90.0030.00517.46
8.0.80.0120.00317.31
8.0.70.0030.00517.23
8.0.60.0040.00417.31
8.0.50.0000.00817.41
8.0.30.0090.00717.24
8.0.20.0150.00617.47
8.0.10.0000.00717.73
8.0.00.0110.00617.28
7.4.330.0060.00017.23
7.4.320.0030.00317.11
7.4.300.0030.00317.22
7.4.290.0070.00017.04
7.4.280.0040.00417.12
7.4.270.0030.00317.15
7.4.260.0090.00017.16
7.4.250.0040.00416.95
7.4.240.0000.00817.09
7.4.230.0000.00716.98
7.4.220.0110.00716.87
7.4.210.0000.01417.06
7.4.200.0000.00717.37
7.4.160.0090.00617.13
7.4.150.0090.00917.40
7.4.140.0130.00717.86
7.4.130.0120.00616.89
7.4.120.0150.00516.93
7.4.110.0120.00616.89
7.4.100.0120.00616.90
7.4.90.0060.01217.00
7.4.80.0080.01419.39
7.4.70.0150.00317.03
7.4.60.0070.01116.87
7.4.50.0090.00417.08
7.4.40.0210.00316.91
7.4.30.0090.00917.13
7.4.10.0020.01615.59
7.4.00.0090.00915.65
7.3.330.0000.00613.66
7.3.320.0000.00713.90
7.3.310.0040.00416.94
7.3.300.0030.00316.82
7.3.290.0100.00716.71
7.3.280.0150.00516.76
7.3.270.0130.00417.40
7.3.260.0070.01016.91
7.3.240.0070.01416.79
7.3.230.0170.00016.73
7.3.210.0090.01216.83
7.3.200.0000.01616.66
7.3.190.0070.01016.91
7.3.180.0080.00816.79
7.3.170.0150.00516.85
7.3.160.0090.00616.77
7.3.130.0050.01315.41
7.3.120.0080.00715.50
7.3.110.0070.01215.38
7.3.100.0060.00815.55
7.3.90.0070.00915.51
7.3.80.0060.00515.42
7.3.70.0070.00915.50
7.3.60.0080.00515.47
7.3.50.0060.00615.48
7.3.40.0040.00915.52
7.3.30.0060.00715.44
7.3.20.0100.00617.17
7.3.10.0050.00917.30
7.3.00.0030.01117.21
7.2.330.0090.01216.91
7.2.320.0100.01016.98
7.2.310.0050.01517.14
7.2.300.0060.01217.07
7.2.290.0120.00617.08
7.2.260.0140.00515.76
7.2.250.0080.00915.78
7.2.240.0070.00915.51
7.2.230.0070.00915.57
7.2.220.0070.01015.85
7.2.210.0040.00915.73
7.2.200.0070.00915.55
7.2.190.0040.01015.55
7.2.180.0060.00715.71
7.2.170.0060.00715.65
7.2.160.0070.01015.49
7.2.150.0020.01217.38
7.2.140.0040.01017.53
7.2.130.0040.01217.61
7.2.120.0050.00717.39
7.2.110.0070.00517.42
7.2.100.0020.01317.55
7.2.90.0080.00517.61
7.2.80.0060.00517.38
7.2.70.0070.00517.46
7.2.60.0090.00617.48
7.2.50.0050.01017.61
7.2.40.0030.01017.41
7.2.30.0050.01217.38
7.2.20.0110.00517.58
7.2.10.0050.01117.59
7.2.00.0030.00718.20
7.1.330.0070.00716.50
7.1.320.0030.00816.35
7.1.310.0070.00816.52
7.1.300.0070.00616.42
7.1.290.0050.00716.26
7.1.280.0070.00516.45
7.1.270.0030.01016.42
7.1.260.0060.00816.50
7.1.250.0030.01116.40
7.1.240.0040.00716.27
7.1.230.0050.01016.21
7.1.220.0030.00716.48
7.1.210.0050.00916.33
7.1.200.0090.00716.29
7.1.190.0070.00916.39
7.1.180.0050.00916.38
7.1.170.0070.00416.43
7.1.160.0030.01016.49
7.1.150.0010.00716.41
7.1.140.0080.00616.49
7.1.130.0090.00616.28
7.1.120.0050.00616.25
7.1.110.0030.01016.47
7.1.100.0060.00717.20
7.1.90.0010.00816.29
7.1.80.0020.01116.20
7.1.70.0060.00616.82
7.1.60.0030.01217.27
7.1.50.0070.00916.85
7.1.40.0080.00516.46
7.1.30.0100.00516.38
7.1.20.0050.00816.49
7.1.10.0040.00716.56
7.1.00.0060.02718.60
7.0.330.0080.00515.82
7.0.320.0040.00615.72
7.0.310.0050.01016.18
7.0.300.0060.00616.01
7.0.290.0070.01016.08
7.0.280.0050.00715.86
7.0.270.0030.00815.70
7.0.260.0060.00916.03
7.0.250.0020.01115.83
7.0.240.0020.01115.94
7.0.230.0050.00716.11
7.0.220.0060.00616.09
7.0.210.0050.00816.02
7.0.200.0140.00615.73
7.0.190.0040.00816.18
7.0.180.0050.00915.78
7.0.170.0060.00816.03
7.0.160.0070.00516.13
7.0.150.0030.00716.04
7.0.140.0050.00715.93
7.0.130.0080.00616.01
7.0.120.0070.00216.01
7.0.110.0030.00816.08
7.0.100.0070.00615.86
7.0.90.0020.01415.86
7.0.80.0030.00916.00
7.0.70.0070.00715.90
7.0.60.0050.02917.98
7.0.50.0050.01816.83
7.0.40.0040.02116.28
7.0.30.0120.02716.14
7.0.20.0130.01816.18
7.0.10.0040.02016.31
7.0.00.0110.03016.15
5.6.400.0090.00514.84
5.6.390.0060.00615.10
5.6.380.0030.01214.59
5.6.370.0040.01115.09
5.6.360.0050.00914.98
5.6.350.0040.01415.06
5.6.340.0060.00815.03
5.6.330.0080.00314.64
5.6.320.0040.01214.86
5.6.310.0060.00814.78
5.6.300.0040.00915.01
5.6.290.0020.01215.06
5.6.280.0030.02117.18
5.6.270.0050.01014.77
5.6.260.0080.00515.11
5.6.250.0030.01114.92
5.6.240.0040.00614.92
5.6.230.0020.00814.81
5.6.220.0090.00514.74
5.6.210.0090.03016.81
5.6.200.0070.02716.12
5.6.190.0030.02116.86
5.6.180.0140.03117.03
5.6.170.0140.03016.81
5.6.160.0050.02416.89
5.6.150.0050.03416.11
5.6.140.0060.03316.18
5.6.130.0070.03216.02
5.6.120.0070.03216.98
5.6.110.0010.02717.14
5.6.100.0070.02616.93
5.6.90.0020.02517.03
5.6.80.0010.03416.75
5.6.70.0060.01014.80
5.6.60.0050.00814.79
5.6.50.0100.00314.81
5.6.40.0060.01114.73
5.6.30.0060.00814.77
5.6.20.0080.00914.87
5.6.10.0060.00814.93
5.6.00.0050.00914.78
5.5.380.0060.00814.90
5.5.370.0050.00914.84
5.5.360.0080.00714.86
5.5.350.0130.03316.75
5.5.340.0070.02515.90
5.5.330.0070.01816.69
5.5.320.0110.03116.67
5.5.310.0130.03116.80
5.5.300.0070.03516.08
5.5.290.0010.03515.94
5.5.280.0100.02716.85
5.5.270.0060.02216.76
5.5.260.0080.03216.86
5.5.250.0110.02916.65
5.5.240.0070.03116.68
5.5.230.0070.00914.71
5.5.220.0060.01014.87
5.5.210.0060.00914.81
5.5.200.0040.00814.54
5.5.190.0060.00614.78
5.5.180.0040.01014.84
5.5.170.0080.00814.79
5.5.160.0050.01114.72
5.5.150.0040.01014.71
5.5.140.0030.01014.74
5.5.130.0050.00814.88
5.5.120.0030.00714.88
5.5.110.0070.00914.83
5.5.100.0090.00514.67
5.5.90.0050.01114.85
5.5.80.0120.00614.46
5.5.70.0060.00814.83
5.5.60.0100.00514.76
5.5.50.0050.01014.97
5.5.40.0070.00814.78
5.5.30.0070.00614.66
5.5.20.0040.01214.85
5.5.10.0030.01214.88
5.5.00.0080.00914.63

preferences:
60.61 ms | 400 KiB | 5 Q