3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback('~(?:^|_)[A-Z]\K[A-Z]+~', function($m){ return strtolower($m[0]);}, 'FIRST_SECOND_THIRD');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6ppKZ
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                                                 '%7E%28%3F%3A%5E%7C_%29%5BA-Z%5D%5CK%5BA-Z%5D%2B%7E'
          2        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
          3        SEND_VAL                                                 ~0
          4        SEND_VAL                                                 'FIRST_SECOND_THIRD'
          5        DO_ICALL                                         $1      
          6        ECHO                                                     $1
          7      > 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/6ppKZ
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'strtolower'
          2        FETCH_DIM_R                                      ~1      !0, 0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.97 ms | 1011 KiB | 15 Q