3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/html; charset=UTF-8'); function traffic($startlat, $startlon, $endlat, $endlon) { GLOBAL $traffic; $traffic=file_get_contents('https://www.waze.com/il-RoutingManager/routingRequest?from=x%3A'.$startlon.'+y%3A'.$startlat.'&to=x%3A'.$endlon.'+y%3A'.$endlat.'&at=0&returnJSON=true&timeout=60000&nPaths=1&clientVersion=4.0.0'); $traffic=json_decode($traffic,true); $tijd=0;$lengte=0; foreach($traffic['response']['results'] as $street) { $tijd = $tijd + $street['crossTime']; $lengte = $lengte + $street['length']; } $tijd = strftime("%M:%S",$tijd); $lengte = round($lengte / 1000,0); return array('tijd' => $tijd, 'lengte' => $lengte); } // $hw = traffic(50.892565,3.114135,50.877122,4.164326); // echo 'Home - Work = '.$hw['tijd'].' / '.$hw['lengte'].'km<br>'; // $wh = traffic(50.877122,4.164326,50.892565,3.114135); // echo 'Work - Home = '.$wh['tijd'].' / '.$wh['lengte'].'km<br>'; $hw = traffic(32.223122,34.993726,32.061679,34.793838); echo 'kokav - Work = '.$hw['tijd'].' / '.$hw['lengte'].'km<br>'; $hw = traffic(32.293122,34.993726,32.061679,34.793838); echo 'kokav2 - Work time MM:SS= '.$hw['tijd'].' / '.$hw['lengte'].'km<br>';

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.0150.00016.88
8.3.50.0070.01616.35
8.3.40.0040.01118.85
8.3.30.0110.00418.96
8.3.20.0060.00320.34
8.3.10.0070.00021.90
8.3.00.0050.00519.69
8.2.180.0060.00916.75
8.2.170.0120.00422.96
8.2.160.0100.00320.50
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00418.00
8.2.110.0030.00720.52
8.2.100.0040.00818.04
8.2.90.0000.00818.28
8.2.80.0030.00617.97
8.2.70.0000.00817.63
8.2.60.0050.00318.05
8.2.50.0040.00418.07
8.2.40.0050.00319.45
8.2.30.0040.00419.99
8.2.20.0040.00417.89
8.2.10.0040.00418.29
8.2.00.0000.00718.27
8.1.280.0060.00925.92
8.1.270.0050.00320.40
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.04
8.1.230.0110.00020.89
8.1.220.0040.00417.76
8.1.210.0060.00318.77
8.1.200.0030.00717.25
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0000.00818.71
8.1.160.0000.00721.99
8.1.150.0030.00518.97
8.1.140.0000.00817.55
8.1.130.0070.00017.77
8.1.120.0000.00717.59
8.1.110.0000.00717.67
8.1.100.0000.00917.63
8.1.90.0000.00717.62
8.1.80.0040.00417.58
8.1.70.0000.00717.61
8.1.60.0000.00817.57
8.1.50.0040.00417.58
8.1.40.0040.00417.63
8.1.30.0040.00417.73
8.1.20.0000.00817.59
8.1.10.0000.00817.71
8.1.00.0040.00417.70
8.0.300.0070.00020.16
8.0.290.0060.00317.00
8.0.280.0070.00018.52
8.0.270.0000.00717.41
8.0.260.0060.00017.31
8.0.250.0050.00317.20
8.0.240.0000.00817.26
8.0.230.0040.00417.24
8.0.220.0030.00317.19
8.0.210.0040.00417.06
8.0.200.0000.00717.22
8.0.190.0050.00317.28
8.0.180.0000.00917.12
8.0.170.0000.00917.10
8.0.160.0030.00517.19
8.0.150.0000.00717.14
8.0.140.0000.00717.10
8.0.130.0050.00313.48
8.0.120.0080.00017.04
8.0.110.0040.00417.05
8.0.100.0040.00417.05
8.0.90.0030.00517.06
8.0.80.0060.01017.15
8.0.70.0000.00817.06
8.0.60.0050.00217.05
8.0.50.0000.00817.16
8.0.30.0070.01117.35
8.0.20.0150.00817.40
8.0.10.0040.00417.23
8.0.00.0060.01216.89
7.4.330.0050.00315.08
7.4.320.0030.00316.61
7.4.300.0030.00316.50
7.4.290.0000.00716.76
7.4.280.0040.00416.73
7.4.270.0000.00716.63
7.4.260.0070.00016.63
7.4.250.0000.00716.57
7.4.240.0040.00416.58
7.4.230.0040.00416.69
7.4.220.0090.00916.70
7.4.210.0130.00616.80
7.4.200.0030.00316.74
7.4.160.0150.00816.73
7.4.150.0060.01217.40
7.4.140.0150.00717.86
7.4.130.0130.00516.77
7.4.120.0090.01216.76
7.4.110.0110.01416.88
7.4.100.0180.00716.91
7.4.90.0100.00716.63
7.4.80.0040.01319.39
7.4.70.0080.00916.58
7.4.60.0130.00316.64
7.4.50.0040.00416.54
7.4.40.0060.01316.53
7.4.30.0120.00916.84
7.4.00.0090.00615.04
7.3.330.0000.00513.50
7.3.320.0030.00313.59
7.3.310.0000.00816.41
7.3.300.0000.00616.64
7.3.290.0080.01116.56
7.3.280.0100.01116.62
7.3.270.0090.00917.40
7.3.260.0100.00916.71
7.3.250.0090.00816.67
7.3.240.0150.00916.72
7.3.230.0080.01416.72
7.3.210.0090.00916.48
7.3.200.0070.01016.72
7.3.190.0110.00616.59
7.3.180.0100.00716.49
7.3.170.0070.01416.63
7.3.160.0100.00716.47
7.3.120.0030.01514.78
7.3.110.0070.01115.03
7.3.100.0030.01614.73
7.3.90.0040.01114.77
7.3.80.0040.01415.08
7.3.70.0040.00715.11
7.3.60.0090.00614.79
7.3.50.0060.00915.21
7.3.40.0040.01115.04
7.3.30.0030.01315.11
7.3.20.0060.00916.95
7.3.10.0040.01116.90
7.3.00.0120.00016.93
7.2.330.0110.00716.77
7.2.320.0120.00616.77
7.2.310.0140.00417.02
7.2.300.0080.00817.10
7.2.290.0070.01716.69
7.2.250.0070.01015.25
7.2.240.0070.01115.25
7.2.230.0030.01015.22
7.2.220.0070.01315.21
7.2.210.0090.00915.24
7.2.200.0060.00615.11
7.2.190.0000.01215.27
7.2.180.0030.01214.96
7.2.170.0030.01015.33
7.2.160.0040.00815.10
7.2.150.0030.00817.00
7.2.140.0100.00317.33
7.2.130.0030.00617.07
7.2.120.0110.00317.12
7.2.110.0120.00316.83
7.2.100.0120.00617.18
7.2.90.0060.00317.25
7.2.80.0040.00717.08
7.2.70.0070.00817.08
7.2.60.0060.00617.18
7.2.50.0070.00717.12
7.2.40.0060.00917.17
7.2.30.0080.00817.07
7.2.20.0070.00717.22
7.2.10.0070.00717.10
7.2.00.0070.00618.25
7.1.330.0140.00015.96
7.1.320.0000.01115.87
7.1.310.0090.00915.89
7.1.300.0130.00015.83
7.1.290.0090.00016.02
7.1.280.0030.00915.73
7.1.270.0000.01715.73
7.1.260.0000.00815.96
7.1.250.0070.00715.79
7.1.240.0100.00315.55
7.1.230.0150.00016.08
7.1.220.0070.01016.02
7.1.210.0100.00316.07
7.1.200.0070.00615.85
7.1.190.0100.00615.93
7.1.180.0030.00615.96
7.1.170.0070.00715.90
7.1.160.0040.00415.89
7.1.150.0110.00415.85
7.1.140.0060.00916.06
7.1.130.0000.01315.95
7.1.120.0030.01215.79
7.1.110.0070.00716.17
7.1.100.0030.01217.27
7.1.90.0060.01216.07
7.1.80.0080.00815.92
7.1.70.0060.00316.67
7.1.60.0100.01017.89
7.1.50.0080.01316.88
7.1.40.0030.01016.00
7.1.30.0060.00716.05
7.1.20.0000.00915.92
7.1.10.0150.00015.93
7.1.00.0050.04219.37
7.0.330.0000.01115.75
7.0.320.0050.00515.54
7.0.310.0040.01215.72
7.0.300.0130.00315.59
7.0.290.0070.00715.58
7.0.280.0080.00415.63
7.0.270.0030.00615.58
7.0.260.0130.00615.48
7.0.250.0060.00615.65
7.0.240.0030.01315.34
7.0.230.0120.00615.73
7.0.220.0100.00615.54
7.0.210.0090.00315.77
7.0.200.0070.00416.40
7.0.190.0000.01415.60
7.0.180.0060.00815.51
7.0.170.0080.00815.54
7.0.160.0040.00815.53
7.0.150.0100.00615.57
7.0.140.0040.00415.68
7.0.130.0000.00815.45
7.0.120.0060.00315.75
7.0.110.0080.00615.50
7.0.100.0090.00315.75
7.0.90.0030.01015.27
7.0.80.0040.00715.59
7.0.70.0070.00715.70
7.0.60.0070.02017.93
7.0.50.0050.03317.03
7.0.40.0040.03217.07
7.0.30.0270.03017.12
7.0.20.0110.03917.09
7.0.10.0020.03316.96
7.0.00.0020.03017.15
5.6.400.0040.00814.38
5.6.390.0060.00914.44
5.6.380.0040.00414.18
5.6.370.0040.01114.84
5.6.360.0070.00414.55
5.6.350.0000.00914.60
5.6.340.0000.01114.78
5.6.330.0000.01514.34
5.6.320.0070.01014.29
5.6.310.0090.00314.82
5.6.300.0090.00614.62
5.6.290.0070.00714.86
5.6.280.0030.04017.92
5.6.270.0040.01114.57
5.6.260.0040.00714.75
5.6.250.0070.00714.38
5.6.240.0090.00314.55
5.6.230.0130.00314.35
5.6.220.0040.01214.55
5.6.210.0070.04517.73
5.6.200.0050.04316.46
5.6.190.0090.02417.82
5.6.180.1840.02417.64
5.6.170.0180.04217.60
5.6.160.0070.03617.69
5.6.150.0030.02716.41
5.6.140.0030.03516.64
5.6.130.0080.04316.61
5.6.120.0000.03017.92
5.6.110.0030.05117.97
5.6.100.0060.02517.80
5.6.90.0070.04717.82
5.6.80.0070.04517.68
5.6.70.2260.01817.60
5.6.60.0070.01014.50
5.6.50.0060.01014.37
5.6.40.0030.00614.58
5.6.30.0070.00714.35
5.6.20.0090.00914.39
5.6.10.0000.01214.27
5.6.00.0090.00014.45
5.5.380.0000.01114.33
5.5.370.0030.01014.25
5.5.360.0070.01014.21
5.5.350.0130.02117.70
5.5.340.0080.02816.42
5.5.330.0090.02617.75
5.5.320.0170.03417.54
5.5.310.0190.04317.45
5.5.300.0050.04716.40
5.5.290.0080.03516.28
5.5.280.0100.04317.92
5.5.270.0060.04317.82
5.5.260.0100.04817.81
5.5.250.0050.04717.77
5.5.240.0140.03817.52
5.5.230.0100.00714.28
5.5.220.0040.01114.54
5.5.210.0110.00414.17
5.5.200.0030.00914.39
5.5.190.0070.00414.29
5.5.180.0040.00414.08
5.5.170.0070.00414.15
5.5.160.0060.00914.53
5.5.150.0030.00914.26
5.5.140.0030.00914.13
5.5.130.0030.00914.27
5.5.120.0040.00414.35
5.5.110.0060.00614.44
5.5.100.0070.01114.09
5.5.90.0080.00814.14
5.5.80.0130.00014.66
5.5.70.0060.00614.38
5.5.60.0000.01414.07
5.5.50.0080.00414.30
5.5.40.0030.01214.32
5.5.30.0070.00714.30
5.5.20.0000.01214.06
5.5.10.0060.00614.31
5.5.00.0000.00914.05
5.4.450.0080.03516.18
5.4.440.0130.03016.18
5.4.430.0090.03416.33
5.4.420.0000.04216.24
5.4.410.0100.03016.22
5.4.400.0120.02916.14
5.4.390.0100.03216.09
5.4.380.0200.03016.08
5.4.370.0120.03816.06
5.4.360.0060.03116.06
5.4.350.0200.02816.08
5.4.340.0070.03416.12
5.4.330.0000.01012.80
5.4.320.0130.03116.09
5.4.310.0140.02916.04
5.4.300.0100.03016.09
5.4.290.0150.02916.06
5.4.280.0100.03016.04
5.4.270.0150.03316.00
5.4.260.0120.02916.16
5.4.250.0070.03516.05
5.4.240.0050.03516.05
5.4.230.0150.02316.12
5.4.220.0180.02616.16
5.4.210.0130.02816.06
5.4.200.0150.02616.11
5.4.190.0100.03316.15
5.4.180.0020.03916.16
5.4.170.0170.02316.08
5.4.160.0120.02816.04
5.4.150.0130.03316.04
5.4.140.0120.02514.59
5.4.130.0080.02714.63
5.4.120.0120.03014.65
5.4.110.0120.02714.57
5.4.100.0110.02714.69
5.4.90.0130.02514.73
5.4.80.0130.02214.74
5.4.70.0100.02014.51
5.4.60.0180.03314.67
5.4.50.0070.03814.68
5.4.40.0050.03314.65
5.4.30.0030.03014.65
5.4.20.0080.02314.68
5.4.10.0030.00712.80
5.4.00.0030.00612.80

preferences:
42.67 ms | 401 KiB | 5 Q