Following code is perfectly valid in BetterReflection, but the outcome is rather unexpected:
class Foo {}
class Foo {}
function bar() {}
function bar() {}
const BAZ = 'baz';
const BAZ = 'baz';
Things that better reflection could do:
- throw an exception if an API such as
getClass($name) is used (expecting 1 result, found 2)
- return all reflections if an API such as
getClassesByName($name) is used (2 results)
This is yet to be decided.