3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filename = "Temperature"; header("Content-type: application/vnd.ms-excel"); header( "Content-disposition: filename=".$filename.".csv"); print "location, weather, obs_time, latitude, longitude, temp_f, wind_d, wind_deg, wind_mph"; print"\r\n"; $xml = simplexml_load_file('http://w1.weather.gov/xml/current_obs/KCHA.xml'); $loca=$xml->location; $weat=$xml->weather; $obs_time=$xml->observation_time; $lat=$xml->latitude; $long=$xml->longitude; $temp=$xml->temp_f; $wind_d=$xml->wind_dir; $wind_deg=$xml->wind_degrees; $wind_m=$xml->wind_mph; print "\"".$loca."\","; print "\"".$weat."\","; print "\"".$obs_time."\","; print "\"".$lat."\","; print "\"".$long."\","; print "\"".$temp."\","; print "\"".$wind_d."\","; print "\"".$wind_deg."\","; print "\"".$wind_m."\","; print"\r\n"; ?>
Output for git.master, git.master_jit
location, weather, obs_time, latitude, longitude, temp_f, wind_d, wind_deg, wind_mph Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for w1.weather.gov failed: System error in /in/Iu9Wn on line 11 Warning: simplexml_load_file(http://w1.weather.gov/xml/current_obs/KCHA.xml): Failed to open stream: php_network_getaddresses: getaddrinfo for w1.weather.gov failed: System error in /in/Iu9Wn on line 11 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://w1.weather.gov/xml/current_obs/KCHA.xml" in /in/Iu9Wn on line 11 Warning: Attempt to read property "location" on bool in /in/Iu9Wn on line 12 Warning: Attempt to read property "weather" on bool in /in/Iu9Wn on line 13 Warning: Attempt to read property "observation_time" on bool in /in/Iu9Wn on line 14 Warning: Attempt to read property "latitude" on bool in /in/Iu9Wn on line 15 Warning: Attempt to read property "longitude" on bool in /in/Iu9Wn on line 16 Warning: Attempt to read property "temp_f" on bool in /in/Iu9Wn on line 17 Warning: Attempt to read property "wind_dir" on bool in /in/Iu9Wn on line 18 Warning: Attempt to read property "wind_degrees" on bool in /in/Iu9Wn on line 19 Warning: Attempt to read property "wind_mph" on bool in /in/Iu9Wn on line 20 "","","","","","","","","",
Output for rfc.property-hooks
location, weather, obs_time, latitude, longitude, temp_f, wind_d, wind_deg, wind_mph Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for w1.weather.gov failed: System error in /in/Iu9Wn on line 11 Warning: simplexml_load_file(http://w1.weather.gov/xml/current_obs/KCHA.xml): Failed to open stream: php_network_getaddresses: getaddrinfo for w1.weather.gov failed: System error in /in/Iu9Wn on line 11 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://w1.weather.gov/xml/current_obs/KCHA.xml" in /in/Iu9Wn on line 11 Warning: Attempt to read property "location" on false in /in/Iu9Wn on line 12 Warning: Attempt to read property "weather" on false in /in/Iu9Wn on line 13 Warning: Attempt to read property "observation_time" on false in /in/Iu9Wn on line 14 Warning: Attempt to read property "latitude" on false in /in/Iu9Wn on line 15 Warning: Attempt to read property "longitude" on false in /in/Iu9Wn on line 16 Warning: Attempt to read property "temp_f" on false in /in/Iu9Wn on line 17 Warning: Attempt to read property "wind_dir" on false in /in/Iu9Wn on line 18 Warning: Attempt to read property "wind_degrees" on false in /in/Iu9Wn on line 19 Warning: Attempt to read property "wind_mph" on false in /in/Iu9Wn on line 20 "","","","","","","","","",

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
30.76 ms | 404 KiB | 8 Q