3v4l.org

run code in 300+ PHP versions simultaneously
<?php class fake_pdo { public function prepare($query){ return $this; } public function execute($array){ echo '<pre>'; print_r($array); } } // Log each login attempt $db = new fake_pdo(); $ipAddress = $_SERVER['REMOTE_ADDR']; $logQuery = "INSERT INTO Logs.Logins (userName, ipAddress) VALUES (:userName,:ipAddress)"; $st = $db->prepare($logQuery); $st->execute(['userName' =>$myName,'ipAddress'=>$ipAddress]); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "REMOTE_ADDR" in /in/U4UbI on line 15 Warning: Undefined variable $myName in /in/U4UbI on line 18 <pre>Array ( [userName] => [ipAddress] => )

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:
43.02 ms | 401 KiB | 8 Q