note 125424 added to function.preg-last-error

From: Date: Fri, 09 Oct 2020 05:43:15 +0000
Subject: note 125424 added to function.preg-last-error
Groups: php.notes 
Request: Send a blank email to php-notes+get-215553@lists.php.net to get a copy of this message
PHP 8 has a native function to retrieve the actual error message, so these helper functions are no longer necessary. https://www.php.net/preg_last_error_msg <?php preg_match('/(?:\D+|<\d+>)*[!?]/', 'foobar foobar foobar'); if (preg_last_error() !== PREG_NO_ERROR) { echo preg_last_error_msg(); // Prints "Backtrack limit exhausted" } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.172 (proxied: 37.223.118.113) ---- Manual Page -- http://php.net/manual/en/function.preg-last-error.php Edit -- https://master.php.net/note/edit/125424 Del: integrated -- https://master.php.net/note/delete/125424/integrated Del: useless -- https://master.php.net/note/delete/125424/useless Del: bad code -- https://master.php.net/note/delete/125424/bad+code Del: spam -- https://master.php.net/note/delete/125424/spam Del: non-english -- https://master.php.net/note/delete/125424/non-english Del: in docs -- https://master.php.net/note/delete/125424/in+docs Del: other reasons-- https://master.php.net/note/delete/125424 Reject -- https://master.php.net/note/reject/125424 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#215553) next »