3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = "en_us"; echo ucfirst(explode('_', $key)[0]);echo ucfirst((explode('_', $key))[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8cqIM
function name:  (null)
number of ops:  20
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                                               'explode'
         12        SEND_VAL                                                 '_'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        FETCH_DIM_R                                      ~6      $5, 1
         16        SEND_VAL                                                 ~6
         17        DO_ICALL                                         $7      
         18        ECHO                                                     $7
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.68 ms | 1394 KiB | 17 Q