3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback('/\d+/', function($match){ var_dump($match); if ($match[1]<100) { return sprintf("%'.03d", $match[1]); } else { return $match[1]; } }, 'H_000100');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ij9BN
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_replace_callback'
          1        SEND_VAL                                                 '%2F%5Cd%2B%2F'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIj9BN%3A3%240'
   10     3        SEND_VAL                                                 ~0
          4        SEND_VAL                                                 'H_000100'
          5        DO_ICALL                                         $1      
          6        ECHO                                                     $1
          7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FIj9BN%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ij9BN
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4        FETCH_DIM_R                                      ~2      !0, 1
          5        IS_SMALLER                                               ~2, 100
          6      > JMPZ                                                     ~3, ->14
    6     7    >   INIT_FCALL                                               'sprintf'
          8        SEND_VAL                                                 '%25%27.03d'
          9        FETCH_DIM_R                                      ~4      !0, 1
         10        SEND_VAL                                                 ~4
         11        DO_ICALL                                         $5      
         12      > RETURN                                                   $5
         13*       JMP                                                      ->16
    8    14    >   FETCH_DIM_R                                      ~6      !0, 1
         15      > RETURN                                                   ~6
   10    16*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.39 ms | 1400 KiB | 19 Q