3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = "en_us"; echo ucfirst(explode('_', $key)[0]);echo ucfirst(array_shift(explode('_', $key)[1]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gesuY
function name:  (null)
number of ops:  24
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'en_us'
          1        INIT_FCALL                                               'ucfirst'
          2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '_'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        FETCH_DIM_R                                      ~3      $2, 0
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                         $4      
          9        ECHO                                                     $4
         10        INIT_FCALL                                               'ucfirst'
         11        INIT_FCALL                                               'array_shift'
         12        INIT_FCALL                                               'explode'
         13        SEND_VAL                                                 '_'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $5      
         16        SEPARATE                                         $5      $5
         17        FETCH_DIM_W                                      $6      $5, 1
         18        SEND_REF                                                 $6
         19        DO_ICALL                                         $7      
         20        SEND_VAR                                                 $7
         21        DO_ICALL                                         $8      
         22        ECHO                                                     $8
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.07 ms | 1395 KiB | 19 Q