3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Hello, this is a test"; $str = preg_replace_callback('/(\w*)(\w)/u', function($m) { return mb_strtoupper($m[1]).mb_strtolower($m[2]); }, $str); echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jv9Xu
function name:  (null)
number of ops:  10
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hello%2C+this+is+a+test'
    5     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%28%5Cw%2A%29%28%5Cw%29%2Fu'
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
    7     4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !0
    5     6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    9     8        ECHO                                                     !0
   10     9      > 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/Jv9Xu
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'mb_strtoupper'
          2        FETCH_DIM_R                                      ~1      !0, 1
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5        INIT_FCALL                                               'mb_strtolower'
          6        FETCH_DIM_R                                      ~3      !0, 2
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                         $4      
          9        CONCAT                                           ~5      $2, $4
         10      > RETURN                                                   ~5
    7    11*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.15 ms | 1012 KiB | 16 Q