3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback( '~(?:\G ?)\p{Lu}+(?= |$)~u', function($m) { return mb_convert_case($m[0], MB_CASE_TITLE); }, 'NEW APPLE IPHONE X 64GB CVX-Dk46' );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2nQmbO
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'
    4     1        SEND_VAL                                                 '%7E%28%3F%3A%5CG+%3F%29%5Cp%7BLu%7D%2B%28%3F%3D+%7C%24%29%7Eu'
    5     2        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
    7     3        SEND_VAL                                                 ~0
    8     4        SEND_VAL                                                 'NEW+APPLE+IPHONE+X+64GB+CVX-Dk46'
    3     5        DO_ICALL                                         $1      
    8     6        ECHO                                                     $1
    9     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/2nQmbO
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'mb_convert_case'
          2        FETCH_DIM_R                                      ~1      !0, 0
          3        SEND_VAL                                                 ~1
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
    7     7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.97 ms | 998 KiB | 15 Q