3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $db = new PDO('sqlite::memory:'); $st = $db->query(" SELECT * FROM (SELECT 'phpinfo()') AS assert'"); $st->fetchAll(PDO::FETCH_FUNC);
based on IHmBr
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to a member function fetchAll() on boolean in /in/RnUFs:5 Stack trace: #0 {main} thrown in /in/RnUFs on line 5
Process exited with code 255.
Output for 5.6.7 - 5.6.28
Fatal error: Call to a member function fetchAll() on boolean in /in/RnUFs on line 5
Process exited with code 255.
Output for 5.1.0 - 5.1.3, 5.2.0 - 5.5.35
Fatal error: Call to a member function fetchAll() on a non-object in /in/RnUFs on line 5
Process exited with code 255.
Output for 5.1.4 - 5.1.6
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /in/RnUFs:3 Stack trace: #0 /in/RnUFs(3): PDO->__construct('sqlite::memory:') #1 {main} thrown in /in/RnUFs on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Class 'PDO' not found in /in/RnUFs on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/RnUFs on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/RnUFs on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/RnUFs on line 5
Process exited with code 255.