3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $db = new PDO('sqlite::memory:'); $st = $db->query(" SELECT 'phpinfo'"); $re = $st->fetchAll(PDO::FETCH_FUNC, array('ReflectionFunction','invoke'));
based on NCD4E
Output for 5.3.2 - 5.6.28, 7.0.0 - 7.1.0
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: non-static method ReflectionFunction::invoke() cannot be called statically in /in/D4CXe on line 5
Output for hhvm-3.12.0
Notice: Array to string conversion in /in/D4CXe on line 5 Warning: SQLSTATE[HY000]: General error: no fetch function specified in /in/D4CXe on line 5
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.0 - 5.3.1
Fatal error: Non-static method ReflectionFunction::invoke() cannot be called statically in /in/D4CXe on line 5
Process exited with code 255.
Output for 5.1.2 - 5.1.3, 5.2.0 - 5.2.17
Strict Standards: Non-static method ReflectionFunction::invoke() cannot be called statically in /in/D4CXe on line 5 Fatal error: invoke() cannot be called statically in /in/D4CXe 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/D4CXe:3 Stack trace: #0 /in/D4CXe(3): PDO->__construct('sqlite::memory:') #1 {main} thrown in /in/D4CXe on line 3
Process exited with code 255.
Output for 5.1.0 - 5.1.1
Fatal error: invoke() cannot be called statically in /in/D4CXe on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Class 'PDO' not found in /in/D4CXe on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ',', expecting '(' in /in/D4CXe 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/D4CXe on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/D4CXe on line 5
Process exited with code 255.