3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo( preg_replace_callback( '~\[admin(.+?)\[/admin\]~is', function($m) { return '[admin' . strtr($m[1], array("\n" => '&#13;', ' ' => ' &#32;')) . '[/admin]'; }, '[admin]test[/admin]' ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gjqh2
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_replace_callback'
    4     1        SEND_VAL                                                 '%7E%5C%5Badmin%28.%2B%3F%29%5C%5B%2Fadmin%5C%5D%7Eis'
    5     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fgjqh2%3A5%240'
    7     3        SEND_VAL                                                 ~0
    8     4        SEND_VAL                                                 '%5Badmin%5Dtest%5B%2Fadmin%5D'
          5        DO_ICALL                                         $1      
          6        ECHO                                                     $1
   10     7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fgjqh2%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gjqh2
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'strtr'
          2        FETCH_DIM_R                                      ~1      !0, 1
          3        SEND_VAL                                                 ~1
          4        SEND_VAL                                                 <array>
          5        DO_ICALL                                         $2      
          6        CONCAT                                           ~3      '%5Badmin', $2
          7        CONCAT                                           ~4      ~3, '%5B%2Fadmin%5D'
          8      > RETURN                                                   ~4
    7     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fgjqh2%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.63 ms | 1395 KiB | 17 Q