3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dir = new Directory(); var_dump($dir);
Output for 5.0.0 - 5.6.28, 7.0.0 - 7.1.0
object(Directory)#1 (0) { }
Output for hhvm-3.12.0
Warning: __construct() expects exactly 1 parameter, 0 given in /in/W9Iau on line 3 Notice: Undefined variable: path in /in/W9Iau on line 3 Notice: Undefined variable: path in /in/W9Iau on line 3 Fatal error: Uncaught TypeError: Argument 1 passed to opendir() must be an instance of string, null given in /in/W9Iau:3 Stack trace: #0 /in/W9Iau(3): Directory->__construct() #1 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Warning: __construct() expects exactly 1 parameter, 0 given in /in/W9Iau on line 3 Notice: Undefined variable: path in /in/W9Iau on line 3 Notice: Undefined variable: path in /in/W9Iau on line 3 Warning: No such file or directory object(Directory)#1 (2) { ["path"]=> NULL ["handle"]=> bool(false) }
Output for 4.3.0 - 4.4.9
object(Directory)(0) { }