Fix GH-21583: SimpleXML empty element incorrectly casts to true.#21590
Fix GH-21583: SimpleXML empty element incorrectly casts to true.#21590devnexen wants to merge 1 commit intophp:PHP-8.4from
Conversation
|
This changes very long standing behaviour. The current behaviour is here since PHP 5.1.x. PHP 5.0.x had different behaviour, closer to what you propose in the PR but not quite the same. |
If that helps, I would rather go towards doc fix. |
|
I agree. While peculiar, this doesn't look like accidental behavior. Changing might be ok, but not in a patch. I'd also add that I think falsy objects are questionable, though I understand that's nothing new in this PR. |
Especially because the SimpleXML behaviour is prone to be quite buggy. I wonder if we should deprecate this feature for SimpleXML. |
|
Just change the docs to the sample that casting a |
No description provided.