note 111583 added to function.error-get-last

From: Date: Wed, 06 Mar 2013 11:26:39 +0000
Subject: note 111583 added to function.error-get-last
Groups: php.notes 
Request: Send a blank email to php-notes+get-193955@lists.php.net to get a copy of this message
To know if something happened between two statements one can of course use a special string with user_error() (in lieu of a built-in special reset mentioned by mail at mbaierl dot com): <?php @user_error($error_get_last_mark='error_get_last mark'); $not_set; $error_get_last=error_get_last(); $something_happened=($error_get_last['message']!=$error_get_last_mark); ?> If your <?php set_error_handler(function) ?> function returns true then you'll have to roll you own error_get_last functionality. (Shortly mentioned by dmgx dot michael at gmail dot com). To manual moderators: Re php.net/manual/add-note.php: Since i guess the above technically sorts under "References to other notes" i feel the need to defend myself with that i'm thinking it might show for usability where other's say it fails and no, i haven't got any other medium to reach the readers of the php manual notes. Also, you could have some examples of what notes you think is okay. Thanks for your moderation. ---- Server IP: 69.147.83.199 Probable Submitter: 83.248.130.88 ---- Manual Page -- http://php.net/manual/en/function.error-get-last.php Edit -- https://master.php.net/note/edit/111583 Del: integrated -- https://master.php.net/note/delete/111583/integrated Del: useless -- https://master.php.net/note/delete/111583/useless Del: bad code -- https://master.php.net/note/delete/111583/bad+code Del: spam -- https://master.php.net/note/delete/111583/spam Del: non-english -- https://master.php.net/note/delete/111583/non-english Del: in docs -- https://master.php.net/note/delete/111583/in+docs Del: other reasons-- https://master.php.net/note/delete/111583 Reject -- https://master.php.net/note/reject/111583 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#193955) next »