|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-07 21:48 UTC] scottmac@php.net
[2007-08-08 12:58 UTC] redsandro at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 08:00:01 2025 UTC |
Description: ------------ When preg_matching a multiline string containing '<?', dumping the resulting $matches array hangs the script engine. I've noticed the same in php 4.4.1 and 5.2.1. Reproduce code: --------------- <?php echo '<pre>'; $var = "<? // <- Remove first two chars and this script won't hang."; $pattern = "/^(.+)$/s"; preg_match($pattern, $var, $matches); print_r($matches); exit; Expected result: ---------------- Array ( [0] => <? // <- Remove first two chars and this script won't hang. [1] => <? // <- Remove first two chars and this script won't hang. ) Actual result: -------------- Array (