3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $pdo = new PDO('sqlite::memory:'); $sql = 'SELECT sqlite_version() as version;'; echo $pdo->query($sql)->fetchColumn();
based on R4ROj
Output for 7.1.0
3.15.1
Output for 7.0.14
3.14.2
Output for 5.4.42 - 5.4.45, 5.5.26 - 5.5.35, 5.6.10 - 5.6.28, 7.0.0 - 7.0.6
3.8.10.2
Output for hhvm-3.12.0
3.11.1
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.5.24 - 5.5.25, 5.6.8 - 5.6.9
3.8.8.3
Output for 5.6.7
3.8.7.2
Output for 5.3.7 - 5.4.41
3.7.7.1
Output for 5.3.6
3.7.4
Output for 5.3.4 - 5.3.5
3.7.3
Output for 5.3.3
3.6.23.1
Output for 5.3.2
3.6.22
Output for 5.3.1
3.6.19
Output for 5.3.0
3.6.15
Output for 5.2.0 - 5.2.1, 5.2.6 - 5.2.17
3.3.7
Output for 5.2.3 - 5.2.5
3.3.17
Output for 5.2.2
3.3.16
Output for 5.1.4 - 5.1.6
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /in/Bh6Iq:2 Stack trace: #0 /in/Bh6Iq(2): PDO->__construct('sqlite::memory:') #1 {main} thrown in /in/Bh6Iq on line 2
Process exited with code 255.
Output for 5.1.2 - 5.1.3
3.2.8
Output for 5.1.0 - 5.1.1
3.2.7
Output for 5.0.0 - 5.0.5
Fatal error: Class 'PDO' not found in /in/Bh6Iq on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/Bh6Iq on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/Bh6Iq on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/Bh6Iq on line 6
Process exited with code 255.