I'm running PHP 5.6.24 and as far as I understand, I should be able to do this:
functions.php
<?php
namespace lib;
function test_function ($var) {
echo $var;
}
?>
test.php
<?
require 'functions.php';
use lib\test_function;
test_function('Hello, world!');
?>
However, I get a Fatal error: Call to undefined function test_function()
What am I doing wrong?
phpinfo();in it. and look through it.