3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Downloading... "; $json = file_get_contents('http://m.vip.com/ajaxapi-classify.html?query=27967&limit=10000'); echo "[O.K.]\n"; $obj = json_decode($json); echo (float)$obj->data[0]->discount; if (file_exists($obj)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="test.txt"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($obj)); readfile($obj); exit; } ?>
Output for git.master, git.master_jit
Downloading... Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for m.vip.com failed: System error in /in/K424O on line 3 Warning: file_get_contents(http://m.vip.com/ajaxapi-classify.html?query=27967&limit=10000): Failed to open stream: php_network_getaddresses: getaddrinfo for m.vip.com failed: System error in /in/K424O on line 3 [O.K.] Warning: Attempt to read property "data" on null in /in/K424O on line 6 Warning: Trying to access array offset on value of type null in /in/K424O on line 6 Warning: Attempt to read property "discount" on null in /in/K424O on line 6 0 Deprecated: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /in/K424O on line 9
Output for rfc.property-hooks
Downloading... Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for m.vip.com failed: System error in /in/K424O on line 3 Warning: file_get_contents(http://m.vip.com/ajaxapi-classify.html?query=27967&limit=10000): Failed to open stream: php_network_getaddresses: getaddrinfo for m.vip.com failed: System error in /in/K424O on line 3 [O.K.] Warning: Attempt to read property "data" on null in /in/K424O on line 6 Warning: Trying to access array offset on null in /in/K424O on line 6 Warning: Attempt to read property "discount" on null in /in/K424O on line 6 0 Deprecated: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /in/K424O on line 9

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:
42.78 ms | 402 KiB | 8 Q