3v4l.org

run code in 300+ PHP versions simultaneously
<?php function comment_retrieve($amount = 0, $username = null, $file = null) { if ($file) { if ($amount > 0) { $querystring_file = ' AND `c_username` = ' . $username; } else { $querystring_file = ' WHERE `c_username` = ' . $username; } } else { $querystring_file = ''; } if ($username) { $querystring_username = ' WHERE `c_username` = ' . $username; } else { $querystring_username = ''; } if ($amount > 0) { $querystring_amount = ' LIMIT ' . $amount; } else { $querystring_amount = ''; } // query $querystring = "SELECT * FROM file_comments" . $querystring_username . $querystring_amount; return $querystring; } echo comment_retrieve(7,bob,HJFG);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "bob" in /in/6L94V:34 Stack trace: #0 {main} thrown in /in/6L94V on line 34
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:
52.08 ms | 401 KiB | 8 Q