Is there a way to get the last error in php4 -


php 5 has error_get_last. there way or @ least partially replicate same functionality in php4.3?

ripped php manual (courtesy of php @ joert dot net):

<?php if( !function_exists('error_get_last') ) {     set_error_handler(         create_function(             '$errno,$errstr,$errfile,$errline,$errcontext',             '                 global $__error_get_last_retval__;                 $__error_get_last_retval__ = array(                     \'type\'        => $errno,                     \'message\'        => $errstr,                     \'file\'        => $errfile,                     \'line\'        => $errline                 );                 return false;             '         )     );      function error_get_last() {         global $__error_get_last_retval__;         if( !isset($__error_get_last_retval__) ) {             return null;         }         return $__error_get_last_retval__;     } } ?> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -