3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace a\b\c\d; class Foo { public static function getNamespace() { echo __NAMESAPACE__; } } echo Foo::getNamespace();
Output for 7.2.0
Warning: Use of undefined constant __NAMESAPACE__ - assumed '__NAMESAPACE__' (this will throw an Error in a future version of PHP) in /in/MJ7IE on line 6 __NAMESAPACE__
Output for 5.3.18 - 7.1.10
Notice: Use of undefined constant __NAMESAPACE__ - assumed '__NAMESAPACE__' in /in/MJ7IE on line 6 __NAMESAPACE__