|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-24 14:24 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Description: ------------ The preg_replace_callback manual-entry says: If matches are found, the new subject will be returned, otherwise subject will be returned unchanged. However; I have a testcase where no input is returned; and my callback isn't called either. This seems to be caused by a required pcre.backtrack_limit of 10000000 Shouldn't PHP return the input or an error giving some pointers about this limit being reached? Reproduce code: --------------- <?PHP $input = '{?value==input.value}'; $regexp = '~\{\?(?:\(?!?.+(==)?.+\)?)+\}{\1\/}~sU'; var_dump(preg_replace_callback($regexp, 'callback', $input)); function callback(){ die('called'); } Expected result: ---------------- I expect an error to be raised when pcre.backtrack_limit is reached Actual result: -------------- NULL is var_dumped