3v4l.org

run code in 500+ PHP versions simultaneously
<?php function ucfirst2($str) { if ( $str[0] > '`' && $str[0] < '{' ) $str[0] = chr(ord($str[0]) - 32); return $str; } echo ucfirst2('Toto');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dBToJ
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                                   'ucfirst2'
          1        SEND_VAL                                                     'Toto'
          2        DO_FCALL                                          0  $0      
          3        ECHO                                                         $0
          4      > RETURN                                                       1

Function ucfirst2:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 7
filename:       /in/dBToJ
function name:  ucfirst2
number of ops:  20
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        FETCH_DIM_R                                          ~1      !0, 0
          2        IS_SMALLER                                           ~2      '%60', ~1
          3      > JMPZ_EX                                              ~2      ~2, ->7
          4    >   FETCH_DIM_R                                          ~3      !0, 0
          5        IS_SMALLER                                           ~4      ~3, '%7B'
          6        BOOL                                                 ~2      ~4
          7    > > JMPZ                                                         ~2, ->18
    5     8    >   INIT_FCALL                                                   'chr'
          9        INIT_FCALL                                                   'ord'
         10        FETCH_DIM_R                                          ~6      !0, 0
         11        SEND_VAL                                                     ~6
         12        DO_ICALL                                             $7      
         13        SUB                                                  ~8      $7, 32
         14        SEND_VAL                                                     ~8
         15        DO_ICALL                                             $9      
         16        ASSIGN_DIM                                                   !0, 0
         17        OP_DATA                                                      $9
    7    18    > > RETURN                                                       !0
    8    19*     > RETURN                                                       null

End of function ucfirst2

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
225 ms | 2172 KiB | 16 Q