3v4l.org

run code in 500+ PHP versions simultaneously
<?php $source = '&#x21;'; $source = preg_replace_callback( '/&#x([a-f0-9]+);/mi', function ($m) { return chr(hexdec($m[1])); }, // Now a Closure $source ); var_dump($source);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OUUQr
function name:  (null)
number of ops:  12
compiled vars:  !0 = $source
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%26%23x21%3B'
    4     1        INIT_FCALL                                                   'preg_replace_callback'
    5     2        SEND_VAL                                                     '%2F%26%23x%28%5Ba-f0-9%5D%2B%29%3B%2Fmi'
    6     3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          4        SEND_VAL                                                     ~2
    7     5        SEND_VAR                                                     !0
    4     6        DO_ICALL                                             $3      
          7        ASSIGN                                                       !0, $3
    9     8        INIT_FCALL                                                   'var_dump'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                                     
         11      > 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/OUUQr
function name:  {closure:/in/OUUQr:6}
number of ops:  10
compiled vars:  !0 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        INIT_FCALL                                                   'chr'
          2        INIT_FCALL                                                   'hexdec'
          3        FETCH_DIM_R                                          ~1      !0, 1
          4        SEND_VAL                                                     ~1
          5        DO_ICALL                                             $2      
          6        SEND_VAR                                                     $2
          7        DO_ICALL                                             $3      
          8      > RETURN                                                       $3
          9*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.1 ms | 3300 KiB | 17 Q