3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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; } //echo CalcularDistancia(38.278096798610605,-0.6911851008339024,38.2788421664234,-0.6901980479164007); echo strtotime('now'); ?>

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.0160.00618.28
8.3.50.0090.00918.18
8.3.40.0090.00918.96
8.3.30.0130.00618.85
8.3.20.0070.00020.29
8.3.10.0040.00420.61
8.3.00.0000.00820.82
8.2.180.0060.00918.54
8.2.170.0100.00722.96
8.2.160.0140.00022.26
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0130.00018.05
8.2.110.0060.00321.12
8.2.100.0090.00317.84
8.2.90.0040.00419.26
8.2.80.0030.00517.97
8.2.70.0030.00717.75
8.2.60.0040.00417.93
8.2.50.0030.00719.35
8.2.40.0090.00020.55
8.2.30.0070.00319.45
8.2.20.0040.00417.89
8.2.10.0040.00418.02
8.2.00.0030.00517.94
8.1.280.0100.00725.92
8.1.270.0120.00623.97
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00923.73
8.1.230.0030.00820.95
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00617.48
8.1.190.0030.00517.34
8.1.180.0000.00818.10
8.1.170.0080.00018.70
8.1.160.0000.00720.73
8.1.150.0020.00518.91
8.1.140.0050.00319.49
8.1.130.0000.00717.67
8.1.120.0030.00317.46
8.1.110.0000.00717.43
8.1.100.0030.00317.50
8.1.90.0000.00717.57
8.1.80.0040.00417.58
8.1.70.0080.00017.46
8.1.60.0070.00017.51
8.1.50.0030.00617.45
8.1.40.0030.00917.49
8.1.30.0090.00017.59
8.1.20.0030.00617.44
8.1.10.0030.00517.63
8.1.00.0090.00017.54
8.0.300.0040.00418.77
8.0.290.0060.00316.88
8.0.280.0040.00418.49
8.0.270.0000.00817.32
8.0.260.0030.00317.36
8.0.250.0000.00817.13
8.0.240.0090.00016.98
8.0.230.0030.00317.05
8.0.220.0000.00716.96
8.0.210.0020.00516.89
8.0.200.0070.00016.96
8.0.190.0030.00316.93
8.0.180.0000.00816.94
8.0.170.0000.00716.89
8.0.160.0040.00417.04
8.0.150.0030.00717.03
8.0.140.0030.00516.88
8.0.130.0000.00613.30
8.0.120.0040.00416.85
8.0.110.0030.00516.90
8.0.100.0040.00416.88
8.0.90.0040.00416.79
8.0.80.0090.00616.95
8.0.70.0040.00416.78
8.0.60.0040.00416.88
8.0.50.0070.00016.97
8.0.30.0100.01017.23
8.0.20.0100.00917.40
8.0.10.0000.00717.22
8.0.00.0090.01116.94
7.4.330.0000.00516.79
7.4.320.0030.00316.56
7.4.300.0000.00616.63
7.4.290.0030.00316.53
7.4.280.0040.00416.65
7.4.270.0030.00316.59
7.4.260.0000.00816.61
7.4.250.0070.00016.60
7.4.240.0040.00416.66
7.4.230.0040.00416.41
7.4.220.0150.00316.66
7.4.210.0070.00716.59
7.4.200.0000.00716.65
7.4.160.0120.00316.41
7.4.150.0130.00417.40
7.4.140.0110.00917.86
7.4.130.0120.00816.53
7.4.120.0080.01016.53
7.4.110.0030.01316.58
7.4.100.0100.01416.63
7.4.90.0140.00316.79
7.4.80.0140.00519.39
7.4.70.0090.00616.52
7.4.60.0090.00916.66
7.4.50.0070.01016.46
7.4.40.0090.01216.55
7.4.30.0070.01016.38
7.4.10.0100.00615.16
7.4.00.0050.01215.13
7.3.330.0060.00013.32
7.3.320.0030.00313.14
7.3.310.0000.00716.45
7.3.300.0000.00716.22
7.3.290.0090.00716.31
7.3.280.0110.00416.36
7.3.270.0060.01117.40
7.3.260.0110.00616.49
7.3.250.0110.00816.46
7.3.240.0090.00916.46
7.3.230.0100.00716.66
7.3.210.0030.01416.68
7.3.200.0090.00916.30
7.3.190.0100.00616.60
7.3.180.0130.00316.52
7.3.170.0150.00316.60
7.3.160.0140.00616.42
7.3.130.0090.00914.74
7.3.120.0060.01215.01
7.3.110.0030.01414.96
7.3.100.0110.00414.95
7.3.90.0000.01214.90
7.3.80.0050.00515.14
7.3.70.0120.00314.83
7.3.60.0130.00314.88
7.3.50.0060.00914.64
7.3.40.0030.00714.65
7.3.30.0070.01014.89
7.3.20.0130.00316.46
7.3.10.0060.01016.77
7.3.00.0080.00516.61
7.2.330.0100.01016.43
7.2.320.0130.00716.62
7.2.310.0130.00316.72
7.2.300.0110.00616.82
7.2.290.0190.00316.77
7.2.260.0030.01414.73
7.2.250.0040.01214.91
7.2.240.0030.01114.90
7.2.230.0110.00415.05
7.2.220.0070.01114.96
7.2.210.0060.00915.13
7.2.200.0030.00615.22
7.2.190.0090.00914.80
7.2.180.0060.00915.23
7.2.170.0060.00315.09
7.2.160.0040.01415.07
7.2.150.0140.00317.07
7.2.140.0030.01216.84
7.2.130.0030.00816.89
7.2.120.0050.00916.71
7.2.110.0030.00716.82
7.2.100.0060.00816.94
7.2.90.0070.00817.00
7.2.80.0040.00716.73
7.2.70.0090.00716.97
7.2.60.0060.00716.86
7.2.50.0050.00516.88
7.2.40.0100.00516.98
7.2.30.0090.00616.83
7.2.20.0100.00517.05
7.2.10.0060.00917.01
7.2.00.0040.01117.64
7.1.330.0080.00815.84
7.1.320.0000.01415.55
7.1.310.0000.01215.79
7.1.300.0060.00915.64
7.1.290.0060.00615.74
7.1.280.0060.00915.87
7.1.270.0110.00315.82
7.1.260.0090.00615.87
7.1.250.0020.01115.94
7.1.240.0060.00916.00
7.1.230.0030.01215.92
7.1.220.0040.00715.55
7.1.210.0110.00415.86
7.1.200.0040.00515.73
7.1.190.0000.01315.74
7.1.180.0040.01115.95
7.1.170.0080.00315.73
7.1.160.0040.01115.77
7.1.150.0060.00615.95
7.1.140.0060.00315.89
7.1.130.0060.00616.00
7.1.120.0030.01315.68
7.1.110.0090.00015.90
7.1.100.0050.00916.89
7.1.90.0030.01015.62
7.1.80.0110.00415.65
7.1.70.0020.01116.37
7.1.60.0070.01217.60
7.1.50.0040.01116.37
7.1.40.0090.00615.68
7.1.30.0030.00815.84
7.1.20.0080.00415.51
7.1.10.0080.00615.58
7.1.00.0050.03919.06
7.0.330.0070.00715.29
7.0.320.0040.00415.52
7.0.310.0040.00715.48
7.0.300.0030.01315.16
7.0.290.0070.00415.55
7.0.280.0000.01215.37
7.0.270.0060.00915.35
7.0.260.0000.00815.57
7.0.250.0040.01215.55
7.0.240.0030.00915.52
7.0.230.0070.01015.38
7.0.220.0040.00715.56
7.0.210.0000.01515.18
7.0.200.0160.01015.06
7.0.190.0030.01115.23
7.0.180.0060.00915.59
7.0.170.0060.01015.59
7.0.160.0040.00815.60
7.0.150.0030.00915.39
7.0.140.0060.01215.51
7.0.130.0070.00715.50
7.0.120.0030.01015.58
7.0.110.0040.01115.21
7.0.100.0040.00815.62
7.0.90.0030.01015.33
7.0.80.0030.00815.39
7.0.70.0070.00715.48
7.0.60.0010.02318.62
7.0.50.0030.02516.58
7.0.40.0020.02617.00
7.0.30.0170.04316.82
7.0.20.0220.04316.77
7.0.10.0110.04316.74
7.0.00.0060.04616.94
5.6.400.0090.00914.28
5.6.390.0090.00614.21
5.6.380.0000.01514.44
5.6.370.0060.00314.44
5.6.360.0070.00714.03
5.6.350.0080.00414.63
5.6.340.0000.01414.61
5.6.330.0040.00714.06
5.6.320.0070.00714.52
5.6.310.0030.00914.57
5.6.300.0000.01214.48
5.6.290.0000.01014.21
5.6.280.0020.03117.65
5.6.270.0070.01314.66
5.6.260.0000.00914.29
5.6.250.0100.00314.06
5.6.240.0040.01114.36
5.6.230.0040.01114.38
5.6.220.0000.01614.28
5.6.210.0110.04117.60
5.6.200.0070.04316.29
5.6.190.0030.03517.55
5.6.180.0210.02817.44
5.6.170.0130.03517.43
5.6.160.0080.03817.38
5.6.150.0070.04716.17
5.6.140.0100.04116.28
5.6.130.0030.04916.22
5.6.120.0060.03517.64
5.6.110.0110.03617.79
5.6.100.0110.02817.64
5.6.90.0050.04717.64
5.6.80.0040.02417.20
5.6.70.0100.00614.25
5.6.60.0040.01513.97
5.6.50.0030.01414.35
5.6.40.0030.00613.98
5.6.30.0150.00014.17
5.6.20.0030.01314.36
5.6.10.0070.00413.97
5.6.00.0090.00614.28
5.5.380.0060.00914.20
5.5.370.0070.00714.41
5.5.360.0040.00813.98
5.5.350.0180.04317.43
5.5.340.0120.03716.16
5.5.330.0050.02817.18
5.5.320.0200.03517.34
5.5.310.0210.03817.25
5.5.300.0040.03716.19
5.5.290.0040.04016.16
5.5.280.0070.04217.56
5.5.270.0060.02817.45
5.5.260.0070.05017.48
5.5.250.0050.04317.33
5.5.240.0100.04017.22
5.5.230.0060.00914.42
5.5.220.0000.01714.13
5.5.210.0000.01714.00
5.5.200.0000.01513.87
5.5.190.0030.00714.31
5.5.180.0030.00914.34
5.5.170.0120.00314.04
5.5.160.0120.00314.06
5.5.150.0080.00314.04
5.5.140.0030.00914.03
5.5.130.0030.01014.34
5.5.120.0060.00914.28
5.5.110.0030.00614.25
5.5.100.0060.00914.07
5.5.90.0100.00614.45
5.5.80.0000.00814.13
5.5.70.0060.00614.03
5.5.60.0030.01014.28
5.5.50.0000.01414.29
5.5.40.0000.01313.78
5.5.30.0060.00314.05
5.5.20.0030.01313.98
5.5.10.0100.00714.21
5.5.00.0060.00614.34

preferences:
119.27 ms | 400 KiB | 5 Q