Elektrine lite

← Feed

@bobmagicii@phpc.social

Post #1085759

2026-04-12 02:51 UTC

@beberlei@phpc.social @asgrim@phpc.social i have a theory that the api is super tedious try and dissuade people from using it to do production logic lol

Replies (1)

  • @OndrejMirtes@phpc.social 2026-04-12 20:16

    @bobmagicii@phpc.social @beberlei@phpc.social @asgrim@phpc.social I wouldn't say it's tedious, it just reflects the actual complexity of the problem. You have: ReflectionNamedType ReflectionUnionType (can also contain multiple intersections - DNF) ReflectionIntersectionType You can't simplify this to "getClass”. Every type behaves different, you need to write code for each of these cases and decide what you want to do with them. Once PHP adds yet another type, you need to add support to it and decide once again the behaviour.

    Open ##1159786