note 41672 added to function.set-error-handler

From: Date: Mon, 19 Apr 2004 10:51:11 +0000
Subject: note 41672 added to function.set-error-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-68319@lists.php.net to get a copy of this message
@sijmen at digitized dot nl That's not true. The reference operator does have effect, when used correctly. Your code doesn't use the reference operator in the set_error_handler function, but it does when creating the new error object. In your case, you have to use the reference operator two times. When calling the set_error_handler function <?php set_error_handler(array(&$this, 'handler')); ?> and when creating the class <?php $eh = &new error; ?> In that case the same error class will be used and the output will be following: Error! !! Hope this helps. ---- Manual Page -- http://www.php.net/manual/en/function.set-error-handler.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41672 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41672&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41672&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68319) next »