I found a different behaviour when I run the following code in Laravel and in a simple php script.
try {
$a=null; $a[3];
var_dump('ok');
} catch (\Exception $e) {
var_dump('error');
}
In Laravel it returns error
but in the simple php script it returns ok
.
I was wonder how can I set to return error
in php script also.