3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Entity { class File { private $foo; } class FileInbox { private $file; public function setFile(File $file) { $this->file = $file; } } } namespace Entity\FileInbox { class File { private $bar; } } namespace Test { $fileInbox = new Entity\FileInbox(); }
based on 0uE1D
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'Test\Entity\FileInbox' not found in /in/l6Ge7:24 Stack trace: #0 {main} thrown in /in/l6Ge7 on line 24
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Class 'Test\Entity\FileInbox' not found in /in/l6Ge7 on line 24
Process exited with code 255.