3v4l.org

run code in 300+ PHP versions simultaneously
<?php include 'include.php'; mysql_connect($mysql_host, $mysql_username, $mysql_password) or die(__LINE__ . ' Invalid connect: ' . mysql_error()); mysql_select_db($mysql_database) or die( "Unable to select database. Run setup first."); $sum = 0.00; $result = mysql_query("select value from invoice_payments where value >= 0.01"); if(!$result) die(__LINE__ . mysql_error()); while($row = mysql_fetch_array($result)) { $sum += 0.01; } $sum *= .90; echo (string)$sum; //echo $sum;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: include(): open_basedir restriction in effect. File(include.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/g6pv9 on line 3 Warning: include(include.php): Failed to open stream: Operation not permitted in /in/g6pv9 on line 3 Warning: include(): Failed opening 'include.php' for inclusion (include_path='.:') in /in/g6pv9 on line 3 Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/g6pv9:4 Stack trace: #0 {main} thrown in /in/g6pv9 on line 4
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:
38.31 ms | 402 KiB | 8 Q