3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = date('dmY-His'); header("Content-type: text/csv"); header("Content-Disposition: attachment; filename=visitors-$file.csv"); header("Pragma: no-cache"); header("Expires: 0"); $sql = "select id, ip, server, time, date from visitors"; $res = mysql_query($sql); $data = array(); $data[] = array('id', 'ip', 'server', 'time', 'date'); while ($row = mysql_fetch_array($res)) { $data[] = array_values($row); } $output = fopen("php://output", "w"); foreach ($data as $val) { fputcsv($output, $val); } fclose($output);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/MmkMW:9 Stack trace: #0 {main} thrown in /in/MmkMW on line 9
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:
59.49 ms | 401 KiB | 8 Q