I think that you didn't try to parse the code, because you have syntax error, and you don't know it, by the way, you can change :
$container = array {"one","two","three"};
$allfiles = array {};
to
$container = array("one","two","three");
$allfiles = array();