3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "1 2 3"; $newStr = preg_replace_callback("/\d+/", function($matches){ return $matches[0] * 2; }, $str); echo $newStr;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IT00f
function name:  (null)
number of ops:  10
compiled vars:  !0 = $str, !1 = $newStr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '1+2+3'
    3     1        INIT_FCALL                                                   'preg_replace_callback'
          2        SEND_VAL                                                     '%2F%5Cd%2B%2F'
          3        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
    5     4        SEND_VAL                                                     ~3
          5        SEND_VAR                                                     !0
    3     6        DO_ICALL                                             $4      
          7        ASSIGN                                                       !1, $4
    6     8        ECHO                                                         !1
          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/IT00f
function name:  {closure:/in/IT00f:3}
number of ops:  5
compiled vars:  !0 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        FETCH_DIM_R                                          ~1      !0, 0
          2        MUL                                                  ~2      ~1, 2
          3      > RETURN                                                       ~2
    5     4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
230.48 ms | 2183 KiB | 14 Q