3v4l.org

run code in 300+ PHP versions simultaneously
<?php $clientNumber = '100'; $supportNumber = '22123322'; $countryCode = 'GB'; $db = new MySQLi('dbmaster', 'user', 'pass', 'dbname'); $existingResult = $db->query(sprintf( "SELECT `id` FROM `calls_queue` WHERE `client_number` = '%s' AND `support_number` = '%s' AND `status` = 0", $clientNumber, $supportNumber )); if ($existingResult && $existingResult->num_rows) { $call = $existingResult->fetch_assoc(); $result = $db->query(sprintf("UPDATE `calls_queue` SET `calls` = `calls` + 1 WHERE `id` = %d", $call['id'])); } else { $result = $db->query(sprintf( "INSERT INTO `calls_queue` (`client_number`, `support_number`, `country_code`, `calls`) VALUES ('%s', '%s', '%s', 1)", $clientNumber, $supportNumber, $countryCode )); }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Class "MySQLi" not found in /in/f2B0U:7 Stack trace: #0 {main} thrown in /in/f2B0U on line 7
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:
44.68 ms | 401 KiB | 8 Q