3v4l.org

run code in 300+ PHP versions simultaneously
<?php $db = new PDO("mysql:host={$connect[0]}; dbname={$database}", $connect[1], $connect[2]); // Log each login attempt $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
Warning: Undefined variable $connect in /in/cXmcu on line 2 Warning: Trying to access array offset on value of type null in /in/cXmcu on line 2 Warning: Undefined variable $database in /in/cXmcu on line 2 Warning: Undefined variable $connect in /in/cXmcu on line 2 Warning: Trying to access array offset on value of type null in /in/cXmcu on line 2 Warning: Undefined variable $connect in /in/cXmcu on line 2 Warning: Trying to access array offset on value of type null in /in/cXmcu on line 2 Fatal error: Uncaught PDOException: could not find driver in /in/cXmcu:2 Stack trace: #0 /in/cXmcu(2): PDO->__construct('mysql:host=; db...', NULL, Object(SensitiveParameterValue)) #1 {main} thrown in /in/cXmcu on line 2
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $connect in /in/cXmcu on line 2 Warning: Trying to access array offset on null in /in/cXmcu on line 2 Warning: Undefined variable $database in /in/cXmcu on line 2 Warning: Undefined variable $connect in /in/cXmcu on line 2 Warning: Trying to access array offset on null in /in/cXmcu on line 2 Warning: Undefined variable $connect in /in/cXmcu on line 2 Warning: Trying to access array offset on null in /in/cXmcu on line 2 Fatal error: Uncaught PDOException: could not find driver in /in/cXmcu:2 Stack trace: #0 /in/cXmcu(2): PDO->__construct('mysql:host=; db...', NULL, Object(SensitiveParameterValue)) #1 {main} thrown in /in/cXmcu on line 2
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:
43.47 ms | 401 KiB | 8 Q