note 78720 added to function.assert-options

From: Date: Wed, 24 Oct 2007 19:45:36 +0000
Subject: note 78720 added to function.assert-options
Groups: php.notes 
Request: Send a blank email to php-notes+get-131700@lists.php.net to get a copy of this message
For all of you try to throw an exception in assert callback function you must set options in following form: <?php error_reporting(E_ALL | E_STRICT); function assert_callcack($file, $line, $message) { throw new Exception(); } assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_WARNING, 0); assert_options(ASSERT_BAIL, 0); assert_options(ASSERT_QUIET_EVAL, 0); assert_options(ASSERT_CALLBACK, 'assert_callcack'); try { assert(false); } catch (Exception $e) { echo 'Yes'; } ?> ---- Server IP: 216.92.131.65 Probable Submitter: 217.82.138.95 ---- Manual Page -- http://www.php.net/manual/en/function.assert-options.php Edit -- https://master.php.net/note/edit/78720 Del: integrated -- https://master.php.net/note/delete/78720/integrated Del: useless -- https://master.php.net/note/delete/78720/useless Del: bad code -- https://master.php.net/note/delete/78720/bad+code Del: spam -- https://master.php.net/note/delete/78720/spam Del: non-english -- https://master.php.net/note/delete/78720/non-english Del: in docs -- https://master.php.net/note/delete/78720/in+docs Del: other reasons-- https://master.php.net/note/delete/78720 Reject -- https://master.php.net/note/reject/78720 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#131700) next »