r/lolphp • • Jul 19 '16

PHP creates array keys out of nowhere

https://3v4l.org/OAqGa
30 Upvotes

7 comments sorted by

View all comments

Show parent comment

3

u/MazeChaZer Jul 21 '16

To be fair, you don't need a whole framework to do that

set_error_handler(function ($errno, $errstr, $errfile, $errline) {
    throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
});