3v4l.org

run code in 500+ PHP versions simultaneously
<?php $strings = [ "test string", "lado lomidze needs a solution", "I made some research and found 'good' answers here; they really helped me." ]; // if not already all lowercase, use strtolower() var_export(preg_replace_callback('/(^|.)\K\w/', function($m) {return strtoupper($m[0]); }, $strings));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E5gYm
function name:  (null)
number of ops:  11
compiled vars:  !0 = $strings
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    8     1        INIT_FCALL                                                   'var_export'
          2        INIT_FCALL                                                   'preg_replace_callback'
          3        SEND_VAL                                                     '%2F%28%5E%7C.%29%5CK%5Cw%2F'
          4        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          5        SEND_VAL                                                     ~2
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $3      
          8        SEND_VAR                                                     $3
          9        DO_ICALL                                                     
         10      > 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/E5gYm
function name:  {closure:/in/E5gYm:8}
number of ops:  7
compiled vars:  !0 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
          0  E >   RECV                                                 !0      
          1        INIT_FCALL                                                   'strtoupper'
          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.5.0


preferences:
175.07 ms | 2023 KiB | 15 Q