$loader = new Twig_Loader_String(file_get_contents("templates/$view"));
<?php
namespace a;
class A {
function hello(){
echo "Hello, I am A with namespace\n";
}
}
require('testB.php');
$namespacedA = new A();
$simpleA = new \A();
$namespacedA->hello();
$simpleA->hello();
?>
<?php
class A {
function hello(){
echo "Hello, I am A without namespace\n";
}
}
?>
Hello, I am A with namespace
Hello, I am A without namespace