3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Plugin Name: Weather Plugin Plugin URI: http://www.yourpluginurlhere.com/ Version: Current Version Author: Name please Description: What does your plugin do and what features does it offer... */ /** * Weather Plugin For Wordpress */ /** * Proper way to enqueue scripts and styles */ define('APFSURL', WP_PLUGIN_URL . "/" . dirname(plugin_basename(__FILE__))); function theme_name_scripts() { //define('weather-plugin', WP_PLUGIN_URL . "/" . dirname(plugin_basename(__FILE__))); wp_enqueue_style( 'weather-plugin', get_stylesheet_uri() ); wp_enqueue_script( 'weather-plugin',APFSURL.'/js/weather-plugin.js', array(), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'theme_name_scripts' ); add_shortcode('weather-plugin','weather_function'); function weather_function(){ $ip = '203.135.41.33';//$_SERVER['REMOTE_ADDR']; $xml = new SimpleXMLElement(file_get_contents("http://www.geoplugin.net/xml.gp?={$ip}")); $city = (array)$xml->geoplugin_city; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22%27'.$city[0].'%27%2C%20ak%22)&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $weather_rss = curl_exec($ch); echo curl_error($ch); curl_close($ch); $return = json_decode($weather_rss); var_dump($weather_rss); $temp = $return->query->results->channel->item->condition->temp; echo "<div> Weather &nbsp; : &nbsp;"; echo "<div class = 'farenheit'> ".$temp." </div>"; $centi = 5/9*($temp-32); $centi1 = number_format((float)$centi, 0, '.', ''); echo "<div class = 'centigrade' style='display:none'> ".$centi1." </div>"; echo "<a hredf='#' id='btn1'>&nbsp;F</a> / <a href='#' id='btn2'> C</a>"; echo "</div>"; } ?>

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.00718.41
8.3.50.0040.01116.28
8.3.40.0130.00318.79
8.3.30.0070.00718.76
8.3.20.0040.00420.38
8.3.10.0040.00423.52
8.3.00.0030.00617.89
8.2.180.0130.00318.66
8.2.170.0160.00022.96
8.2.160.0070.00720.58
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0030.00519.70
8.2.110.0050.00520.52
8.2.100.0110.00017.66
8.2.90.0040.00419.22
8.2.80.0080.00017.97
8.2.70.0030.00617.50
8.2.60.0000.00817.80
8.2.50.0030.00618.10
8.2.40.0030.00620.53
8.2.30.0030.00620.71
8.2.20.0000.00817.85
8.2.10.0030.00518.09
8.2.00.0050.00217.99
8.1.280.0040.01125.92
8.1.270.0090.00623.92
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00623.86
8.1.230.0000.01123.98
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.01017.23
8.1.190.0000.00917.23
8.1.180.0060.00318.10
8.1.170.0050.00318.66
8.1.160.0000.00721.97
8.1.150.0000.00718.88
8.1.140.0030.00517.33
8.1.130.0030.00617.67
8.1.120.0070.00017.41
8.1.110.0030.00517.40
8.1.100.0040.00417.48
8.1.90.0000.00817.43
8.1.80.0060.00317.33
8.1.70.0030.00317.38
8.1.60.0040.00417.43
8.1.50.0090.00017.44
8.1.40.0040.00417.49
8.1.30.0050.00517.63
8.1.20.0040.00417.64
8.1.10.0050.00317.50
8.1.00.0000.00817.41
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00718.39
8.0.270.0070.00017.27
8.0.260.0030.00518.48
8.0.250.0000.00717.08
8.0.240.0000.00717.05
8.0.230.0000.00717.01
8.0.220.0030.00517.02
8.0.210.0000.00716.89
8.0.200.0000.00817.05
8.0.190.0080.00017.00
8.0.180.0040.00416.99
8.0.170.0030.00517.02
8.0.160.0040.00417.06
8.0.150.0070.00016.81
8.0.140.0070.00016.91
8.0.130.0000.00613.36
8.0.120.0030.00715.15
8.0.110.0060.00415.22
8.0.100.0050.00515.25
8.0.90.0080.00215.18
8.0.80.0100.00715.24
8.0.70.0060.00415.09
8.0.60.0040.00515.14
8.0.50.0100.00015.26
8.0.30.0060.00915.88
8.0.20.0110.00916.42
8.0.10.0040.00515.27
8.0.00.0060.00915.98
7.4.330.0000.00515.08
7.4.320.0050.00216.49
7.4.300.0070.00016.54
7.4.290.0040.00416.56
7.4.280.0070.00016.47
7.4.270.0040.00416.58
7.4.260.0030.00316.50
7.4.250.0050.00314.83
7.4.240.0080.00115.45
7.4.230.0060.00414.89
7.4.220.0080.00814.88
7.4.210.0120.00314.87
7.4.200.0050.00514.96
7.4.190.0120.00013.21
7.4.180.0080.00413.29
7.4.160.0120.00114.87
7.4.150.0070.00715.34
7.4.140.0110.00416.32
7.4.130.0080.01015.57
7.4.120.0060.00915.36
7.4.110.0090.00614.77
7.4.100.0080.00714.85
7.4.90.0080.00714.89
7.4.80.0080.00616.29
7.4.70.0170.01514.81
7.4.60.0100.00214.77
7.4.50.0020.00614.83
7.4.40.0060.00714.77
7.4.30.0020.01114.77
7.4.20.0030.00613.13
7.4.10.0000.00813.21
7.4.00.0100.00314.24
7.3.330.0000.00513.33
7.3.320.0000.00613.17
7.3.310.0050.00114.69
7.3.300.0030.00314.65
7.3.290.0080.00615.50
7.3.280.0060.00715.54
7.3.270.0080.00515.36
7.3.260.0030.00814.93
7.3.250.0100.00715.61
7.3.240.0050.00414.72
7.3.230.0060.00614.93
7.3.220.0060.00013.34
7.3.210.0070.00714.89
7.3.200.0030.00814.75
7.3.190.0230.01314.76
7.3.180.0050.00614.75
7.3.170.0020.01014.89
7.3.160.0070.00414.77
7.3.150.0080.00013.26
7.3.140.0030.00313.28
7.3.130.0030.00313.12
7.3.120.0060.00514.04
7.3.110.0030.00714.02
7.3.100.0010.00813.94
7.3.90.0070.00314.06
7.3.80.0040.00513.92
7.3.70.0030.00713.98
7.3.60.0050.00414.17
7.3.50.0020.00614.07
7.3.40.0030.00814.06
7.3.30.0100.00214.00
7.3.20.0050.00515.80
7.3.10.0020.00815.83
7.3.00.0030.00616.03
7.2.340.0020.00513.17
7.2.330.0100.00914.91
7.2.320.0090.00614.99
7.2.310.0120.00614.79
7.2.300.0100.00714.94
7.2.290.0080.00715.01
7.2.280.0050.00813.32
7.2.270.0100.00313.32
7.2.260.0000.01213.14
7.2.250.0120.00314.20
7.2.240.0050.00914.17
7.2.230.0080.00514.16
7.2.220.0090.00614.10
7.2.210.0060.00814.17
7.2.200.0070.00814.11
7.2.190.0080.00714.13
7.2.180.0100.00314.20
7.2.170.0090.00514.24
7.2.160.0080.00413.33
7.2.150.0130.00015.10
7.2.140.0090.00515.20
7.2.130.0080.00616.01
7.2.120.0070.00615.84
7.2.110.0110.00316.08
7.2.100.0060.00815.96
7.2.90.0130.00215.96
7.2.80.0110.00415.94
7.2.70.0030.01015.88
7.2.60.0060.00816.24
7.2.50.0070.00615.97
7.2.40.0080.00415.98
7.2.30.0090.00516.07
7.2.20.0060.00816.07
7.2.10.0090.00316.05
7.2.00.0080.00417.11
7.1.330.0080.00415.00
7.1.320.0060.00614.79
7.1.310.0120.00314.79
7.1.300.0080.00314.96
7.1.290.0040.00814.91
7.1.280.0090.00314.91
7.1.270.0080.00714.79
7.1.260.0020.00815.03
7.1.250.0030.00914.85
7.1.240.0100.00414.77
7.1.230.0040.00915.02
7.1.220.0070.00714.96
7.1.210.0080.00514.93
7.1.200.0130.00615.17
7.1.190.0060.00614.85
7.1.180.0090.00214.93
7.1.170.0080.00415.00
7.1.160.0080.00514.87
7.1.150.0070.00614.90
7.1.140.0080.00514.81
7.1.130.0090.00314.76
7.1.120.0030.00814.87
7.1.110.0070.00314.94
7.1.100.0050.00815.92
7.1.90.0090.00315.03
7.1.80.0070.00714.89
7.1.70.0050.00615.45
7.1.60.0100.00716.46
7.1.50.0060.00915.55
7.1.40.0080.00414.88
7.1.30.0060.00514.90
7.1.20.0100.00414.95
7.1.10.0080.00514.87
7.1.00.0070.02717.47
7.0.330.0020.00814.67
7.0.320.0060.00414.66
7.0.310.0120.00114.70
7.0.300.0100.00214.70
7.0.290.0050.00514.72
7.0.280.0030.00814.76
7.0.270.0080.00214.72
7.0.260.0040.00814.81
7.0.250.0100.00214.67
7.0.240.0010.00814.83
7.0.230.0090.00414.88
7.0.220.0050.00414.75
7.0.210.0100.00314.72
7.0.200.0070.00415.37
7.0.190.0060.00614.71
7.0.180.0040.00714.82
7.0.170.0110.00214.77
7.0.160.0090.00214.82
7.0.150.0100.00414.77
7.0.140.0100.00414.71
7.0.130.0100.00314.80
7.0.120.0090.00314.75
7.0.110.0060.00414.82
7.0.100.0100.00114.82
7.0.90.0090.00314.68
7.0.80.0070.00514.79
7.0.70.0070.00514.60
7.0.60.0100.01916.39
7.0.50.0060.02015.79
7.0.40.0100.03115.93
7.0.30.0160.02515.87
7.0.20.0140.02415.88
7.0.10.0070.01715.87
7.0.00.0050.02815.79
5.6.400.0070.00412.64
5.6.390.0060.00612.66
5.6.380.0070.00513.51
5.6.370.0060.00413.34
5.6.360.0070.00513.38
5.6.350.0070.00313.28
5.6.340.0070.00513.33
5.6.330.0070.00413.52
5.6.320.0080.00313.24
5.6.310.0080.00513.66
5.6.300.0070.00613.38
5.6.290.0080.00613.52
5.6.280.0050.01415.85
5.6.270.0100.00513.50
5.6.260.0060.00713.31
5.6.250.0090.00313.15
5.6.240.0100.00313.39
5.6.230.0080.00613.47
5.6.220.0070.00413.20
5.6.210.0080.02115.80
5.6.200.0080.03015.08
5.6.190.0090.02515.79
5.6.180.0120.02115.72
5.6.170.0130.03115.65
5.6.160.0100.02715.65
5.6.150.0070.02015.01
5.6.140.0060.02915.11
5.6.130.0100.02715.02
5.6.120.0050.02415.88
5.6.110.0080.02015.90
5.6.100.0040.01815.92
5.6.90.0070.03015.84
5.6.80.0070.01515.69
5.6.70.0070.00413.44
5.6.60.0020.00913.39
5.6.50.0060.00713.32
5.6.40.0090.00413.46
5.6.30.0040.00813.41
5.6.20.0050.00713.18
5.6.10.0080.00313.47
5.6.00.0060.00613.18
5.5.380.0070.00311.85
5.5.370.0050.00511.87
5.5.360.0080.00111.81
5.5.350.0010.03314.69
5.5.340.0060.03213.74
5.5.330.0040.02014.65
5.5.320.0050.02214.50
5.5.310.0150.02914.65
5.5.300.0080.01313.84
5.5.290.0070.01513.92
5.5.280.0070.03114.81
5.5.270.0100.02914.84
5.5.260.0020.02714.93
5.5.250.0070.02414.76
5.5.240.0100.02314.67
5.5.230.0060.00311.75
5.5.220.0090.00311.76
5.5.210.0040.00611.72
5.5.200.0070.00311.72
5.5.190.0090.00211.70
5.5.180.0060.00411.65
5.5.170.0070.00311.67
5.5.160.0040.00411.70
5.5.150.0070.00311.72
5.5.140.0050.00511.59
5.5.130.0080.00211.70
5.5.120.0040.00611.79
5.5.110.0080.00411.65
5.5.100.0050.00611.86
5.5.90.0080.00311.75
5.5.80.0070.00511.85
5.5.70.0090.00111.84
5.5.60.0060.00511.78
5.5.50.0110.00011.88
5.5.40.0050.00411.82
5.5.30.0050.00511.86
5.5.20.0060.00411.85
5.5.10.0050.00511.78
5.5.00.0070.00611.82
5.4.450.0270.02014.40
5.4.440.0230.02114.22
5.4.430.0190.02314.49
5.4.420.0220.02314.42
5.4.410.0210.02114.42
5.4.400.0220.01814.40
5.4.390.0190.02314.21
5.4.380.0240.02114.26
5.4.370.0200.02014.28
5.4.360.0180.02214.15
5.4.350.0230.01614.37
5.4.340.0210.02314.08
5.4.330.0040.00511.83
5.4.320.0250.03014.31
5.4.310.0240.01914.26
5.4.300.0180.01914.30
5.4.290.0120.02214.15
5.4.280.0240.02114.23
5.4.270.0200.02314.36
5.4.260.0210.02214.32
5.4.250.0220.02414.34
5.4.240.0290.02014.27
5.4.230.0280.01914.16
5.4.220.0270.02014.26
5.4.210.0260.02314.32
5.4.200.0220.02114.13
5.4.190.0270.01914.15
5.4.180.0240.01814.20
5.4.170.0190.02014.21
5.4.160.0290.01814.20
5.4.150.0250.02414.08
5.4.140.0250.02613.28
5.4.130.0210.01913.43
5.4.120.0290.02213.21
5.4.110.0250.02413.15
5.4.100.0260.02013.38
5.4.90.0250.02113.36
5.4.80.0270.01813.34
5.4.70.0070.02613.29
5.4.60.0090.01513.35
5.4.50.0070.02513.36
5.4.40.0160.01513.31
5.4.30.0170.02013.21
5.4.20.0110.01913.37
5.4.10.0030.00511.73
5.4.00.0050.00611.57

preferences:
55.05 ms | 400 KiB | 5 Q