3v4l.org

run code in 300+ PHP versions simultaneously
<?php $initial = 'PROP_RESOURCE_TYPE'; $words = explode('_', $initial); foreach($words as $word){ $word = ucfirst(str_to_lower($word)); echo $word; } print_r($words);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/BLv0N
function name:  (null)
number of ops:  22
compiled vars:  !0 = $initial, !1 = $words, !2 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'PROP_RESOURCE_TYPE'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '_'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6      > FE_RESET_R                                       $6      !1, ->17
          7    > > FE_FETCH_R                                               $6, !2, ->17
    6     8    >   INIT_FCALL                                               'ucfirst'
          9        INIT_FCALL_BY_NAME                                       'str_to_lower'
         10        SEND_VAR_EX                                              !2
         11        DO_FCALL                                      0  $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !2, $8
    7    15        ECHO                                                     !2
    5    16      > JMP                                                      ->7
         17    >   FE_FREE                                                  $6
    9    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.36 ms | 1395 KiB | 19 Q