3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_replace_callback( '#a#', function($matches) { var_dump($matches); }, 'aa' ); preg_replace_callback( '#(?<hello>a)#', function($matches) { var_dump($matches); }, 'aa' );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bDNbd
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_replace_callback'
    4     1        SEND_VAL                                                 '%23a%23'
    5     2        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
    7     3        SEND_VAL                                                 ~0
    8     4        SEND_VAL                                                 'aa'
    3     5        DO_ICALL                                                 
   11     6        INIT_FCALL                                               'preg_replace_callback'
   12     7        SEND_VAL                                                 '%23%28%3F%3Chello%3Ea%29%23'
   13     8        DECLARE_LAMBDA_FUNCTION                          ~2      [1]
   15     9        SEND_VAL                                                 ~2
   16    10        SEND_VAL                                                 'aa'
   11    11        DO_ICALL                                                 
   17    12      > 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/bDNbd
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    7     4      > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bDNbd
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   15     4      > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.2 ms | 1438 KiB | 15 Q