Adds tests from php.net for Array methods not yet implemented
merge fix and minor alterations to scoping to allow tests to run