3v4l.org

run code in 500+ PHP versions simultaneously
<?php preg_replace_callback('/a/', function($m) { for($i = 0; $i < 10000; $i++) preg_replace('/foo'.$i.'bar/', 'baz', '???foo'.$i.'bar???'); return 'b'; }, 'aa');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RY30H
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'preg_replace_callback'
          1        SEND_VAL                                                     '%2Fa%2F'
          2        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
    7     3        SEND_VAL                                                     ~0
          4        SEND_VAL                                                     'aa'
    3     5        DO_ICALL                                                     
    7     6      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
Branch analysis from position: 3
filename:       /in/RY30H
function name:  {closure:/in/RY30H:3}
number of ops:  15
compiled vars:  !0 = $m, !1 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        ASSIGN                                                       !1, 0
          2      > JMP                                                          ->11
    5     3    >   CONCAT                                               ~3      '%2Ffoo', !1
          4        CONCAT                                               ~4      ~3, 'bar%2F'
          5        CONCAT                                               ~5      '%3F%3F%3Ffoo', !1
          6        CONCAT                                               ~6      ~5, 'bar%3F%3F%3F'
          7        FRAMELESS_ICALL_3                preg_replace        ~7      ~4, 'baz'
          8        OP_DATA                                                      ~6
          9        FREE                                                         ~7
    4    10        PRE_INC                                                      !1
         11    >   IS_SMALLER                                                   !1, 10000
         12      > JMPNZ                                                        ~9, ->3
    6    13    > > RETURN                                                       'b'
    7    14*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.63 ms | 2728 KiB | 16 Q