Bug #63651 [NEW]: preg_replace() returns null for very long string
| From: | magog dot the dot ogre at gmail dot com | Date: | Fri, 30 Nov 2012 01:46:45 +0000 |
| Subject: | Bug #63651 [NEW]: preg_replace() returns null for very long string | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-175036@lists.php.net to get a copy of this message | ||
From: magog dot the dot ogre at gmail dot com
Operating system: Windows, Unix
PHP version: 5.3.19
Package: *Regular Expressions
Bug Type: Bug
Bug description:preg_replace() returns null for very long string
Description:
------------
I have tested and gotten this error on the following two distros:
*5.3.19 for Windows
*5.3.8 for SunOS
Run the code at the pastebin link I've provided. You will see that PHP is
returning null in a preg_replace function! It occurs in both Windows and
Unix. I
do not know if this is a PHP problem, or a PCRE problem.
Test script:
---------------
http://pastebin.com/PBCDexXH
Expected result:
----------------
A string should be outputted
Actual result:
--------------
Instead, a NULL result is outputted.
--
Edit bug report at https://bugs.php.net/bug.php?id=63651&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63651&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63651&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63651&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=63651&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=63651&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63651&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=63651&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=63651&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=63651&r=support
Expected behavior: https://bugs.php.net/fix.php?id=63651&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=63651&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=63651&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=63651&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63651&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=63651&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=63651&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=63651&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63651&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63651&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=63651&r=mysqlcfg