I am trying to find answer of following question:
Function world() is defined in the namespace 'myapp\utils\hello.' Your code is in namespace 'myapp'
What is the correct way to import the hello namespace so you can use the world() function?
Following is my code which I am trying but I am getting this error:
Fatal error: Call to undefined function myapp\world()
My Code:
<?php
namespace myapp;
use myapp\utils\hello;
world();
namespace myapp\utils\hello;
function world()
{
echo 'yes world';
}