> The current solution for code reuse (use longer class names to avoid clashes, we help you with syntactic sugar called "namespaces") is the wrong approach imo.
You can in theory create modules with require.
module.php
<?php
return (function(){
$foo = function(){echo "hello from PHP";};
return [
"greet"=>$foo
];
})();
script.php <?php
$module = require('./module.php');
$module["greet"]();
But PHP namespaces and autoloading via composer ARE the community accepted way to handle namespacing. The ecosystem is so large developers aren't going to move to a different module system at that point. Especially when composer is the defacto package manager for PHP.