| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2016-06-07 16:23 UTC] cmb@php.net
 
-Status: Open
+Status: Feedback
  [2016-06-07 16:23 UTC] cmb@php.net
  [2016-06-15 00:23 UTC] cmb@php.net
 
-Assigned To:
+Assigned To: cmb
  [2016-06-26 04:22 UTC] php-bugs at lists dot php dot net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 06:00:01 2025 UTC | 
Description: ------------ We have a regular expression that removed nested comments from an HTML string. It was working OK in PHP 5.3 and 5.5 but crashes in PHP 5.6.20 and 5.6.22 The included test script is a very cut down version of string being processed. The number of characters seems to be important, removing some characters from the class names will make the script run but I can't figure the logic of it. PHP crashes without outputting any errors, I only have the Windows Event Log output: Faulting application name: httpd.exe, version: 2.4.12.0, time stamp: 0x550eaef9 Faulting module name: php5ts.dll, version: 5.6.22.0, time stamp: 0x57468b87 Exception code: 0xc00000fd Fault offset: 0x0011ddd2 Faulting process id: 0x1600 Faulting application start time: 0x01d1c0c7b01411c2 Faulting application path: C:\Apache24\bin\httpd.exe Faulting module path: C:\php-5.6.22\php5ts.dll Report Id: 23060e48-35e8-41c0-96e7-f75628bdf8f9 Faulting package full name: Faulting package-relative application ID: Test script: --------------- <?php $html = <<<EOT <div> <p>Hello World</p> <!-- <table class="123456789132456789123456789123456789123456789"> <tr class=""> <!--<td></td>--> <!--<td></td>--> <td class="123456789123456789123456789123456789123456789">FooBar</td> </tr> </table> --> </div> EOT; do { $html = preg_replace("/<!--(?(?!<!--).)*-->/sU", '', $html, -1, $count); } while ($count); echo $html; Expected result: ---------------- <div> <p>Hello World</p> </div> Actual result: -------------- Site can't be reached error