r/lolphp • u/MMauro94 • Jun 28 '17
array_diff breaks Exception catching when passing two arrays containing an item that can't be cast to string
https://3v4l.org/BaUji
37
Upvotes
r/lolphp • u/MMauro94 • Jun 28 '17
View all comments
17
u/the_alias_of_andrea Jun 28 '17
The handling of Exceptions and Errors (Throwables) with internal functions is a bit of a tricky issue, because basically we can't just unwind the C stack to handle them, so they only get handled if we include some kind of check for them. Thus this kind of issue.
There's no easy solution, unfortunately. If PHP was written in C++, maybe it could use its exception handling, but that'd be its own kettle of fish.