3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Sylius\Bundle\ResourceBundle\DependencyInjection { class SyliusResourceExtension { function test() { echo str_replace('Extension', 'Bundle', trim(strrchr(__CLASS__, '\\'), '\\')); } } } namespace Sylius\Bundle\ProductBundle\DependencyInjection { use Sylius\Bundle\ResourceBundle\DependencyInjection\SyliusResourceExtension; class SyliusProductExtension extends SyliusResourceExtension {} } $a = new SyliusProductExtension(); $a->test();
Output for 5.3.0 - 5.4.21
Fatal error: No code may exist outside of namespace {} in /in/WvcgB on line 17
Process exited with code 255.