Write a PHP script to get the last occurred error.
<?php echo $x; print_r(error_get_last()); ?>
Sample Output:
Array ( [type] => 8 [message] => Undefined variable: x [file] => /home/students/0d0149c0-f42e-11e6-a8c0-b738b9f f32f9.php [line] => 2 )
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
Array ( [type] => 8 [message] => Undefined variable: x [file] => /home/students/0d0149c0-f42e-11e6-a8c0-b738b9f f32f9.php [line] => 2 )need an explanation for this answer? contact us directly to get an explanation for this answer