3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback('/(\w+) (\w+)/', function($matches) { var_dump($matches); return strtoupper($matches);},'rodrigo capile rodrigo capile rodrigo capile');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vKr0L
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'preg_replace_callback'
          1        SEND_VAL                                                 '%2F%28%5Cw%2B%29+%28%5Cw%2B%29%2F'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FvKr0L%3A2%240'
    4     3        SEND_VAL                                                 ~0
          4        SEND_VAL                                                 'rodrigo+capile+rodrigo+capile+rodrigo+capile'
          5        DO_ICALL                                         $1      
          6        ECHO                                                     $1
          7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FvKr0L%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vKr0L
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'strtoupper'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
          8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FvKr0L%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.16 ms | 940 KiB | 20 Q