3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "&#233333;"; $str = preg_replace_callback( '/\&\#([0-9]+)\;/m', function($matches) { var_dump($matches); return strtoupper($matches[1]); }, $str ); echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlG2K
function name:  (null)
number of ops:  10
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%26%23233333%3B'
    5     1        INIT_FCALL                                                   'preg_replace_callback'
    6     2        SEND_VAL                                                     '%2F%5C%26%5C%23%28%5B0-9%5D%2B%29%5C%3B%2Fm'
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
    9     4        SEND_VAL                                                     ~2
          5        SEND_VAR                                                     !0
    5     6        DO_ICALL                                             $3      
          7        ASSIGN                                                       !0, $3
   12     8        ECHO                                                         !0
   13     9      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlG2K
function name:  {closure:/in/vlG2K:6}
number of ops:  10
compiled vars:  !0 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
    7     1        INIT_FCALL                                                   'var_dump'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                                     
    8     4        INIT_FCALL                                                   'strtoupper'
          5        FETCH_DIM_R                                          ~2      !0, 1
          6        SEND_VAL                                                     ~2
          7        DO_ICALL                                             $3      
          8      > RETURN                                                       $3
    9     9*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.14 ms | 2151 KiB | 16 Q