Is there a way to get the PHP namespace to allow callers in the namespace as if they were global?
Example:
handle()
Instead
prggmr\handle()
Here is my sample code:
<?php
require_once 'prggmr/src/prggmr.php';
prggmr\handle(function() {
echo 'This is a test scenario';
}, 'test');
prggmr\signal('test');
Smoothing does not work for functions:
<?php
require 'prggmr/src/prggmr.php';
use prggmr\handle;
handle(function(){
echo "Test";
}, "test");
Results:
Fatal error: Call to undefined function handle()
Jream source
share