3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name = ""; $first_name = "Subscriber"; $nameParts = explode(" ", $name); if($nameParts && $nameParts[0]) { $first_name = ucfirst($nameParts[0]); } var_dump($nameParts); var_dump($first_name);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 10
filename:       /in/WOn8c
function name:  (null)
number of ops:  23
compiled vars:  !0 = $name, !1 = $first_name, !2 = $nameParts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, ''
    3     1        ASSIGN                                                   !1, 'Subscriber'
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    5     7      > JMPZ_EX                                          ~7      !2, ->10
          8    >   FETCH_DIM_R                                      ~8      !2, 0
          9        BOOL                                             ~7      ~8
         10    > > JMPZ                                                     ~7, ->16
    6    11    >   INIT_FCALL                                               'ucfirst'
         12        FETCH_DIM_R                                      ~9      !2, 0
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !1, $10
    8    16    >   INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
    9    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.13 ms | 1395 KiB | 19 Q