3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php PDO::setAttribute ( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db = new PDO('mysql:dbname=gregregrewgrewgr', '', '');
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Non-static method PDO::setAttribute() cannot be called statically in /in/QBiKT:2 Stack trace: #0 {main} thrown in /in/QBiKT on line 2
Process exited with code 255.
Output for 5.3.28 - 5.3.29, 5.4.18 - 5.6.28, hhvm-3.10.0 - 3.12.0
Fatal error: Non-static method PDO::setAttribute() cannot be called statically in /in/QBiKT on line 2
Process exited with code 255.
Output for 5.1.0 - 5.3.27, 5.4.0 - 5.4.17
Fatal error: Non-static method PDO::setAttribute() cannot be called statically in /in/BSkVM on line 2
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Class 'PDO' not found in /in/BSkVM on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ',', expecting '(' in /in/BSkVM on line 2
Process exited with code 255.
Output for 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ',', expecting '(' in /in/BSkVM on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/BSkVM on line 2
Process exited with code 255.
Output for 4.3.0
Parse error: parse error, unexpected ',', expecting '(' in /in/QBiKT on line 2
Process exited with code 255.