3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Berlin'); function getsuntimes($sunrisemin,$sunsetmin){ $result = file_get_contents('http://weather.yahooapis.com/forecastrss?w=12835286&u=c'); $xml = simplexml_load_string($result); $xml->registerXPathNamespace('yweather', 'http://xml.weather.yahoo.com/ns/rss/1.0'); $astronomy = $xml->channel->xpath('yweather:astronomy'); $sunrise = $astronomy[0]['sunrise']; $sunset = $astronomy[0]['sunset']; $sunrise = date("G:i", strtotime($sunrise)); $sunset = date("G:i", strtotime($sunset)); $dt = DateTime::createFromFormat('H:i', $sunrise); if ($sunrisemin > 0) { $dt->add(new DateInterval('PT'.$sunrisemin.'M')); } else { $sunrisemin = str_replace('-','',$sunrisemin); $dt->sub(new DateInterval('PT'.$sunrisemin.'M')); } $sunrisemod = $dt->format('H:i'); $dt = DateTime::createFromFormat('H:i', $sunset); if ($sunsetmin > 0) { $dt->add(new DateInterval('PT'.$sunsetmin.'M')); } else { $sunsetmin = str_replace('-','',$sunsetmin); $dt->sub(new DateInterval('PT'.$sunsetmin.'M')); } $sunsetmod = $dt->format('H:i'); $output['sunrise'] = $sunrisemod; $output['sunset'] = $sunsetmod; return $output; } ?>

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.0110.00416.50
8.3.50.0090.00821.97
8.3.40.0090.00618.77
8.3.30.0070.00718.88
8.3.20.0040.00420.20
8.3.10.0000.00823.52
8.3.00.0040.00420.69
8.2.180.0040.01516.32
8.2.170.0140.00022.96
8.2.160.0130.00720.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00320.66
8.2.110.0060.00322.08
8.2.100.0040.00820.54
8.2.90.0000.00819.09
8.2.80.0040.00417.97
8.2.70.0090.00017.50
8.2.60.0080.00017.68
8.2.50.0060.00318.07
8.2.40.0030.00519.82
8.2.30.0000.00718.02
8.2.20.0030.00517.58
8.2.10.0030.00517.96
8.2.00.0050.00317.68
8.1.280.0090.00925.92
8.1.270.0040.00423.96
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00622.05
8.1.230.0050.00519.02
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0060.00317.23
8.1.190.0040.00417.13
8.1.180.0050.00318.10
8.1.170.0030.00618.49
8.1.160.0000.00721.98
8.1.150.0040.00418.71
8.1.140.0040.00417.48
8.1.130.0050.00317.75
8.1.120.0040.00317.47
8.1.110.0040.00417.38
8.1.100.0000.00817.39
8.1.90.0060.00317.46
8.1.80.0040.00417.34
8.1.70.0070.00017.40
8.1.60.0030.00517.45
8.1.50.0030.00517.40
8.1.40.0070.00417.40
8.1.30.0030.00617.42
8.1.20.0050.00317.53
8.1.10.0050.00217.39
8.1.00.0000.00717.33
8.0.300.0000.00718.77
8.0.290.0060.00316.63
8.0.280.0070.00018.39
8.0.270.0070.00017.13
8.0.260.0030.00317.22
8.0.250.0070.00016.71
8.0.240.0060.00016.90
8.0.230.0070.00016.92
8.0.220.0070.00016.77
8.0.210.0040.00416.82
8.0.200.0000.00616.81
8.0.190.0040.00416.86
8.0.180.0040.00416.80
8.0.170.0080.00016.78
8.0.160.0040.00416.79
8.0.150.0080.00016.77
8.0.140.0070.00016.65
8.0.130.0030.00313.15
8.0.120.0000.00716.67
8.0.110.0000.00816.82
8.0.100.0040.00416.74
8.0.90.0030.00316.66
8.0.80.0030.01516.68
8.0.70.0000.00716.76
8.0.60.0000.00716.62
8.0.50.0040.00416.61
8.0.30.0050.01616.96
8.0.20.0110.00817.40
8.0.10.0040.00417.02
8.0.00.0090.00916.54
7.4.330.0030.00315.00
7.4.320.0030.00316.36
7.4.300.0030.00316.46
7.4.290.0050.00216.51
7.4.280.0030.00616.36
7.4.270.0000.00716.36
7.4.260.0000.00716.49
7.4.250.0040.00416.27
7.4.240.0030.00316.33
7.4.230.0000.00716.32
7.4.220.0190.00616.59
7.4.210.0100.00316.46
7.4.200.0070.00016.29
7.4.190.0030.00316.40
7.4.160.0160.00616.12
7.4.150.0120.00617.40
7.4.140.0090.01117.86
7.4.130.0080.01216.50
7.4.120.0080.00916.46
7.4.110.0110.00816.30
7.4.100.0150.00716.50
7.4.90.0110.00716.33
7.4.80.0130.00619.39
7.4.70.0070.01016.39
7.4.60.0030.01216.34
7.4.50.0050.00316.49
7.4.40.0100.00716.43
7.4.30.0120.00316.55
7.4.00.0030.01315.05
7.3.330.0040.00413.07
7.3.320.0060.00012.97
7.3.310.0000.00716.08
7.3.300.0030.00316.16
7.3.290.0120.00616.21
7.3.280.0070.01116.27
7.3.270.0090.00917.40
7.3.260.0120.00616.32
7.3.250.0140.00616.32
7.3.240.0120.00416.41
7.3.230.0100.00716.40
7.3.210.0150.00616.29
7.3.200.0090.00919.39
7.3.190.0150.00416.40
7.3.180.0060.01016.39
7.3.170.0110.00516.37
7.3.160.0040.01116.30
7.3.120.0070.01014.96
7.3.110.0070.00714.76
7.3.100.0060.00614.57
7.3.90.0030.00714.79
7.3.80.0060.00914.73
7.3.70.0000.01114.64
7.3.60.0060.00914.76
7.3.50.0040.00814.69
7.3.40.0060.00614.25
7.3.30.0110.00414.50
7.3.20.0040.01116.45
7.3.10.0110.00416.60
7.3.00.0060.00616.52
7.2.330.0110.00716.40
7.2.320.0070.01416.36
7.2.310.0030.01316.36
7.2.300.0090.00916.31
7.2.290.0060.01216.66
7.2.240.0040.01114.95
7.2.230.0060.00915.08
7.2.220.0040.01115.14
7.2.210.0030.01014.93
7.2.200.0030.01315.01
7.2.190.0070.01014.98
7.2.180.0030.00914.79
7.2.170.0060.00914.99
7.2.160.0080.00314.52
7.2.150.0040.00416.68
7.2.140.0080.00816.77
7.2.130.0060.00916.65
7.2.120.0100.00216.46
7.2.110.0050.00816.78
7.2.100.0030.01216.63
7.2.90.0090.00416.79
7.2.80.0110.00716.74
7.2.70.0090.00516.55
7.2.60.0040.01216.64
7.2.50.0030.01016.70
7.2.40.0040.00716.86
7.2.30.0000.01216.58
7.2.20.0020.01216.62
7.2.10.0050.00916.68
7.2.00.0010.01117.59
7.1.330.0080.00315.77
7.1.320.0030.00615.52
7.1.310.0030.00715.35
7.1.300.0100.00615.39
7.1.290.0030.00615.79
7.1.280.0000.01715.54
7.1.270.0070.00715.25
7.1.260.0000.00915.64
7.1.250.0030.01015.52
7.1.240.0000.00915.63
7.1.230.0130.00315.41
7.1.220.0060.01115.34
7.1.210.0070.00715.66
7.1.200.0050.00615.53
7.1.190.0060.00615.79
7.1.180.0120.00315.64
7.1.170.0080.00415.61
7.1.160.0080.00815.77
7.1.150.0040.00415.70
7.1.140.0030.00615.42
7.1.130.0040.00815.77
7.1.120.0030.00915.54
7.1.110.0060.00615.64
7.1.100.0030.00616.85
7.1.90.0070.00715.87
7.1.80.0070.00715.40
7.1.70.0020.00716.51
7.1.60.0040.00916.36
7.1.50.0070.01016.04
7.1.40.0030.01015.68
7.1.30.0100.00015.64
7.1.20.0100.00315.46
7.1.10.0030.00915.52
7.1.00.0060.04218.99
7.0.330.0030.01015.06
7.0.320.0100.00314.77
7.0.310.0060.00314.94
7.0.300.0000.00815.05
7.0.290.0000.01014.95
7.0.280.0040.00715.11
7.0.270.0060.00615.11
7.0.260.0110.00015.07
7.0.250.0000.01015.03
7.0.240.0040.00715.25
7.0.230.0120.00315.42
7.0.220.0110.00415.38
7.0.210.0080.00415.06
7.0.200.0020.01015.83
7.0.190.0030.01115.04
7.0.180.0000.00715.33
7.0.170.0140.00315.38
7.0.160.0160.00014.97
7.0.150.0110.00015.16
7.0.140.0020.04318.64
7.0.130.0030.01015.13
7.0.120.0130.00015.30
7.0.110.0060.00315.24
7.0.100.0130.04217.67
7.0.90.0080.04517.48
7.0.80.0070.04517.55
7.0.70.0050.03217.47
7.0.60.0070.04317.54
7.0.50.0070.04017.72
7.0.40.0050.04716.64
7.0.30.0080.04016.65
7.0.20.0050.04716.62
7.0.10.0050.04016.60
7.0.00.0070.04116.65
5.6.380.0070.00714.14
5.6.370.0030.01014.24
5.6.360.0050.00513.98
5.6.350.0060.00614.03
5.6.340.0000.01113.91
5.6.330.0080.00414.08
5.6.320.0100.00014.19
5.6.310.0100.00314.05
5.6.300.0040.00414.20
5.6.290.0000.01414.20
5.6.280.0040.00714.30
5.6.270.0110.00014.14
5.6.260.0030.00613.98
5.6.250.0030.04717.39
5.6.240.0070.03017.30
5.6.230.0060.02817.35
5.6.220.0040.04317.30
5.6.210.0050.04317.31
5.6.200.0040.03117.52
5.6.190.0050.02917.53
5.6.180.0070.02817.45
5.6.170.0030.05217.56
5.6.160.0090.02317.50
5.6.150.0100.03817.52
5.6.140.0080.02317.54
5.6.130.0050.03717.55
5.6.120.0050.03217.62
5.6.110.0050.04117.49
5.6.100.0070.02717.58
5.6.90.0050.04917.46
5.6.80.0090.04017.31
5.6.70.0130.04017.27
5.6.60.0080.04217.21
5.6.50.0060.04117.07
5.6.40.0080.04217.34
5.6.30.0050.04517.27
5.6.20.0080.02417.11
5.6.10.0090.04017.21
5.6.00.0070.02817.16
5.5.380.0050.02215.77
5.5.370.0060.04115.78
5.5.360.0040.04215.81
5.5.350.0080.04315.81
5.5.340.0090.03215.98
5.5.330.0120.03315.97
5.5.320.0060.04116.05
5.5.310.0020.03316.00
5.5.300.0090.04116.01
5.5.290.0080.03116.03
5.5.280.0030.04715.98
5.5.270.0020.04516.06
5.5.260.0060.02316.05
5.5.250.0070.04515.96
5.5.240.0080.02815.72
5.5.230.0010.02815.68
5.5.220.0020.04315.74
5.5.210.0030.04515.75
5.5.200.0030.02915.72
5.5.190.0060.03815.66
5.5.180.0000.03715.66
5.5.170.0080.00011.18
5.5.160.0030.04415.64
5.5.150.0080.03815.73
5.5.140.0150.03315.66
5.5.130.0030.03915.71
5.5.120.0040.02615.71
5.5.110.0030.04515.73
5.5.100.0050.02515.63
5.5.90.0020.02515.63
5.5.80.0020.04015.64
5.5.70.0060.02215.65
5.5.60.0020.02215.67
5.5.50.0110.03315.65
5.5.40.0070.01915.61
5.5.30.0030.02315.56
5.5.20.0020.02715.65
5.5.10.0020.03415.58
5.5.00.0070.01715.59
5.4.450.0060.03715.21
5.4.440.0070.02815.21
5.4.430.0030.04015.32
5.4.420.0080.03815.31
5.4.410.0070.03515.21
5.4.400.0060.02015.11
5.4.390.0040.02515.13
5.4.380.0040.04215.11
5.4.370.0050.03215.15
5.4.360.0000.04615.01
5.4.350.0100.03515.19
5.4.340.0020.02715.11
5.4.330.0040.00411.18
5.4.320.0060.04115.11
5.4.310.0130.03315.15
5.4.300.0070.03415.06
5.4.290.0090.03615.11
5.4.280.0030.02615.16
5.4.270.0050.03815.16
5.4.260.0100.03315.20
5.4.250.0060.02315.19
5.4.240.0040.02015.13
5.4.230.0020.02715.19
5.4.220.0020.02515.15
5.4.210.0070.02015.13
5.4.200.0020.02315.19
5.4.190.0000.02615.14
5.4.180.0020.02115.15
5.4.170.0020.02215.13
5.4.160.0020.03215.10
5.4.150.0060.03415.16
5.4.140.0030.03713.79
5.4.130.0020.03813.71
5.4.120.0030.02613.71
5.4.110.0080.01713.83
5.4.100.0020.02313.81
5.4.90.0030.02013.78
5.4.80.0030.02713.75
5.4.70.0030.02413.83
5.4.60.0020.02013.77
5.4.50.0060.01613.83
5.4.40.0040.02013.84
5.4.30.0040.02113.76
5.4.20.0060.01913.74
5.4.10.0040.02013.76
5.4.00.0050.02013.56
5.3.290.0030.04413.01
5.3.280.0000.02713.01
5.3.270.0030.02113.01
5.3.260.0060.01713.01
5.3.250.0030.02113.01
5.3.240.0030.02413.01
5.3.230.0050.02313.01
5.3.220.0050.02513.01
5.3.210.0010.02113.01
5.3.200.0070.03513.01
5.3.190.0030.03213.01
5.3.180.0030.02013.01
5.3.170.0030.02313.01
5.3.160.0030.03313.01
5.3.150.0030.02013.01
5.3.140.0000.02513.01
5.3.130.0030.02413.01
5.3.120.0030.02013.01
5.3.110.0040.02113.01
5.3.100.0020.02213.01
5.3.90.0070.01813.01
5.3.80.0020.02913.01
5.3.70.0070.01813.01
5.3.60.0050.02013.01
5.3.50.0010.02413.01
5.3.40.0020.02213.01
5.3.30.0030.01613.01
5.3.20.0020.02613.01
5.3.10.0050.01713.01
5.3.00.0000.02213.01
5.2.170.0030.02813.01
5.2.160.0020.01613.01
5.2.150.0020.02113.01
5.2.140.0030.01813.01
5.2.130.0030.01613.01
5.2.120.0050.02513.01
5.2.110.0000.02113.01
5.2.100.0020.01913.01
5.2.90.0060.01713.01
5.2.80.0020.01713.01
5.2.70.0030.01513.01
5.2.60.0010.01813.01
5.2.50.0040.01513.01
5.2.40.0060.02813.01
5.2.30.0000.02413.01
5.2.20.0040.01713.01
5.2.10.0000.03313.01
5.2.00.0010.03513.01
5.1.60.0050.02013.01
5.1.50.0060.02513.01
5.1.40.0030.03013.01
5.1.30.0070.02713.01
5.1.20.0030.02113.01
5.1.10.0010.02313.01
5.1.00.0020.03213.01
5.0.50.0020.02513.01
5.0.40.0070.01713.01
5.0.30.0070.02013.01
5.0.20.0040.02313.01
5.0.10.0050.02213.01
5.0.00.0000.02813.01
4.4.90.0040.00913.01
4.4.80.0030.00713.01
4.4.70.0000.02213.01
4.4.60.0020.02013.01
4.4.50.0050.01713.01
4.4.40.0030.02813.01
4.4.30.0020.01113.01
4.4.20.0030.02113.01
4.4.10.0020.01913.01
4.4.00.0020.03013.01
4.3.110.0000.01513.01
4.3.100.0000.01113.01
4.3.90.0020.01813.01
4.3.80.0030.03113.01
4.3.70.0020.01513.01
4.3.60.0050.02213.01
4.3.50.0030.01013.01
4.3.40.0050.02513.01
4.3.30.0000.01613.01
4.3.20.0030.01513.01
4.3.10.0020.01013.01
4.3.00.0050.01013.01

preferences:
45.73 ms | 401 KiB | 5 Q