3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cookieFile = "cookies.txt"; if(!file_exists($cookieFile)) { $fh = fopen($cookieFile, "w"); fwrite($fh, ""); fclose($fh); } $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => 'http://localhost/mysite/test.php?data=hello', CURLOPT_HEADER => false, CURLOPT_COOKIESESSION=>true, CURLOPT_COOKIEFILE => $cookieFile, CURLOPT_COOKIEJAR => $cookieFile )); $resp = curl_exec($curl); curl_close($curl); echo $resp; ?>
Output for git.master, git.master_jit
Warning: file_exists(): open_basedir restriction in effect. File(cookies.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/RVEkr on line 3 Warning: fopen(): open_basedir restriction in effect. File(cookies.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/RVEkr on line 4 Warning: fopen(cookies.txt): Failed to open stream: Operation not permitted in /in/RVEkr on line 4 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /in/RVEkr:5 Stack trace: #0 /in/RVEkr(5): fwrite(false, '') #1 {main} thrown in /in/RVEkr on line 5
Process exited with code 255.
Output for rfc.property-hooks
Warning: file_exists(): open_basedir restriction in effect. File(cookies.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/RVEkr on line 3 Warning: fopen(): open_basedir restriction in effect. File(cookies.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/RVEkr on line 4 Warning: fopen(cookies.txt): Failed to open stream: Operation not permitted in /in/RVEkr on line 4 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, false given in /in/RVEkr:5 Stack trace: #0 /in/RVEkr(5): fwrite(false, '') #1 {main} thrown in /in/RVEkr on line 5
Process exited with code 255.

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:
145.84 ms | 408 KiB | 5 Q