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; echo "[RESULT 1]\n"; echo = preg_replace_callback( '@(<br[^>]*+>)|\s*+</?+p>\s*+|(?<=<t(?:r|d))[^>]*+(?=>)@', function ($matches) { return isset($matches[1]) ? '、' : ''; }, $text1 ); echo "\n[RESULT 2]\n"; echo = preg_replace_callback( '@(<br[^>]*+>)|\s*+</?+p>\s*+|(?<=<t(?:r|d))[^>]*+(?=>)@', function ($matches) { return isset($matches[1]) ? '、' : ''; }, $text2 );
Output for 5.4.20
Parse error: syntax error, unexpected '=' in /in/Mc2HI on line 23
Process exited with code 255.
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.19
Parse error: syntax error, unexpected '=' in /in/FafMq on line 23
Process exited with code 255.

preferences:
181.09 ms | 1399 KiB | 56 Q