3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "[spoiler]Test\ntesting[/spoiler]."; $text = preg_replace_callback("(\[spoiler\](.*?)\[\/spoiler\])is", function($match){ echo "test"; $lines = explode("\n", str_rot13($match[1])); /* $output = ""; foreach ($lines as $line) { $output .= "[spoiler]".$line."[/spoiler]\n"; } */ $output = implode("[/spoiler]\n[spoiler]", $lines); return $output; }, $text ); echo $text; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MWkd8
function name:  (null)
number of ops:  10
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5Bspoiler%5DTest%0Atesting%5B%2Fspoiler%5D.'
    5     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%28%5C%5Bspoiler%5C%5D%28.%2A%3F%29%5C%5B%5C%2Fspoiler%5C%5D%29is'
    6     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FMWkd8%3A6%240'
   17     4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
    5     7        ASSIGN                                                   !0, $3
   19     8        ECHO                                                     !0
   21     9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FMWkd8%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MWkd8
function name:  {closure}
number of ops:  18
compiled vars:  !0 = $match, !1 = $lines, !2 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ECHO                                                     'test'
    8     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%0A'
          4        INIT_FCALL                                               'str_rot13'
          5        FETCH_DIM_R                                      ~3      !0, 1
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
   15    11        INIT_FCALL                                               'implode'
         12        SEND_VAL                                                 '%5B%2Fspoiler%5D%0A%5Bspoiler%5D'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !2, $7
   16    16      > RETURN                                                   !2
   17    17*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FMWkd8%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.63 ms | 1396 KiB | 21 Q