3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { // global class Yii { public static function abc() { echo 'hello', PHP_EOL; } } } namespace A\Name\Space { use Yii; Yii::abc(); // resolved to the global namespace // without the use statement php would resolve Yii === A\Name\Space\Yii } namespace { // global again use Yii; // warning, resolved at compile time. Yii::abc(); // you aliased Yii with Yii }
Output for git.master_jit, git.master, rfc.property-hooks
Warning: The use statement with non-compound name 'Yii' has no effect in /in/K0D61 on line 16 hello hello

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
33.28 ms | 405 KiB | 5 Q