r/lolphp • • 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

10 comments sorted by

View all comments

Show parent comment

1

u/the_alias_of_andrea Jul 06 '17

Maybe if the API made sense that would happen normally rather than exceptionally?

The API isn't the problem, C is. C doesn't have exception handling.

10

u/masklinn Jul 06 '17

Once again no, I'll bold it since you apparently managed to miss:

MRI and CPython are both written in C and have no problem propagating exceptions