3v4l.org

run code in 300+ 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                                  '%00%7Bclosure%7D%2Fin%2FRY30H%3A3%240'
    7     3        SEND_VAL                                                 ~0
          4        SEND_VAL                                                 'aa'
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FRY30H%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
Branch analysis from position: 3
filename:       /in/RY30H
function name:  {closure}
number of ops:  17
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                                                      ->13
    5     3    >   INIT_FCALL                                               'preg_replace'
          4        CONCAT                                           ~3      '%2Ffoo', !1
          5        CONCAT                                           ~4      ~3, 'bar%2F'
          6        SEND_VAL                                                 ~4
          7        SEND_VAL                                                 'baz'
          8        CONCAT                                           ~5      '%3F%3F%3Ffoo', !1
          9        CONCAT                                           ~6      ~5, 'bar%3F%3F%3F'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
    4    12        PRE_INC                                                  !1
         13    >   IS_SMALLER                                               !1, 10000
         14      > JMPNZ                                                    ~9, ->3
    6    15    > > RETURN                                                   'b'
    7    16*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FRY30H%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.39 ms | 1396 KiB | 17 Q