3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text1 = <<<EOD <tr class="aaa"> <td class="bbb"> <p> あああああ </p> </td> <tr> EOD; $text2 = <<<EOD <tr class="aaa"> <td class="bbb"> あああああ </td> <tr> EOD; $text1 = preg_replace_callback( '@<br[^>]*+>|(</?+p>)|(?<=<t(?:r|d))[^>]*+(?=>)@', function ($matches) { return isset($matches[1])) ? '、' : ''; }, $text1 ); $text2 = preg_replace_callback( '@<br[^>]*+>|(</?+p>)|(?<=<t(?:r|d))[^>]*+(?=>)@', function ($matches) { return isset($matches[1])) ? '、' : ''; }, $text2 ); var_dump($text1, $text2);
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.20, 5.5.0 - 5.5.4
Parse error: syntax error, unexpected ')' in /in/QU80N on line 24
Process exited with code 255.

preferences:
179.14 ms | 1400 KiB | 61 Q