-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
phpstan/phpstan-src
#4126Labels
Milestone
Description
Bug report
Dynamic properties on SimpleXMLElement don't ever return null. Even for a non-existent child, it still returns a SimpleXMLElement (with a count of 0). See https://3v4l.org/a6OFI for the proof.
Array access on SimpleXMLElement also returns SimpleXMLElement objects, not mixed
Code snippet that reproduces the problem
https://phpstan.org/r/5940e7c0-7917-48e8-b4d2-b218480877dc
Expected output
SimpleXMLElement types instead of nullable or mixed types.
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable