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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6VQJa
function name:  (null)
number of ops:  21
compiled vars:  !0 = $text1, !1 = $text2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Ctr+class%3D%22aaa%22%3E%0A%3Ctd+class%3D%22bbb%22%3E%0A%3Cp%3E%0A%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3%81%82%0A%3C%2Fp%3E%0A%3C%2Ftd%3E%0A%3Ctr%3E'
   13     1        ASSIGN                                                   !1, '%3Ctr+class%3D%22aaa%22%3E%0A%3Ctd+class%3D%22bbb%22%3E%0A%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3%81%82%0A%3C%2Ftd%3E%0A%3Ctr%3E'
   21     2        INIT_FCALL                                               'preg_replace_callback'
   22     3        SEND_VAL                                                 '%40%3Cbr%5B%5E%3E%5D%2A%2B%3E%7C%28%3C%2F%3F%2Bp%3E%29%7C%28%3F%3C%3D%3Ct%28%3F%3Ar%7Cd%29%29%5B%5E%3E%5D%2A%2B%28%3F%3D%3E%29%40'
   23     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F6VQJa%3A23%240'
   25     5        SEND_VAL                                                 ~4
   26     6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
   21     8        ASSIGN                                                   !0, $5
   29     9        INIT_FCALL                                               'preg_replace_callback'
   30    10        SEND_VAL                                                 '%40%3Cbr%5B%5E%3E%5D%2A%2B%3E%7C%28%3C%2F%3F%2Bp%3E%29%7C%28%3F%3C%3D%3Ct%28%3F%3Ar%7Cd%29%29%5B%5E%3E%5D%2A%2B%28%3F%3D%3E%29%40'
   31    11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F6VQJa%3A31%241'
   33    12        SEND_VAL                                                 ~7
   34    13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $8      
   29    15        ASSIGN                                                   !1, $8
   37    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F6VQJa%3A23%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6VQJa
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   24     1        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 1
          2      > JMPZ                                                     ~1, ->5
          3    >   QM_ASSIGN                                        ~2      ''
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~2      '%E3%80%81'
          6    > > RETURN                                                   ~2
   25     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F6VQJa%3A23%240

Function %00%7Bclosure%7D%2Fin%2F6VQJa%3A31%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6VQJa
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   RECV                                             !0      
   32     1        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 1
          2      > JMPZ                                                     ~1, ->5
          3    >   QM_ASSIGN                                        ~2      ''
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~2      '%E3%80%81'
          6    > > RETURN                                                   ~2
   33     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F6VQJa%3A31%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.95 ms | 1400 KiB | 17 Q