3v4l.org

run code in 300+ PHP versions simultaneously
<?php $full_name = 'Jason'; $name = explode(' ', $full_name, 2); if(count($name) < 2) { $first_name = null; $last_name = $name[0]; } else { $first_name = $name[0]; $last_name = $name[1]; } echo "First: $first_name .. Last: $last_name";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jZRK0
function name:  (null)
number of ops:  24
compiled vars:  !0 = $full_name, !1 = $name, !2 = $first_name, !3 = $last_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Jason'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    7     7        COUNT                                            ~7      !1
          8        IS_SMALLER                                               ~7, 2
          9      > JMPZ                                                     ~8, ->14
    9    10    >   ASSIGN                                                   !2, null
   10    11        FETCH_DIM_R                                      ~10     !1, 0
         12        ASSIGN                                                   !3, ~10
         13      > JMP                                                      ->18
   14    14    >   FETCH_DIM_R                                      ~12     !1, 0
         15        ASSIGN                                                   !2, ~12
   15    16        FETCH_DIM_R                                      ~14     !1, 1
         17        ASSIGN                                                   !3, ~14
   18    18    >   ROPE_INIT                                     4  ~17     'First%3A+'
         19        ROPE_ADD                                      1  ~17     ~17, !2
         20        ROPE_ADD                                      2  ~17     ~17, '+..+Last%3A+'
         21        ROPE_END                                      3  ~16     ~17, !3
         22        ECHO                                                     ~16
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.74 ms | 1395 KiB | 15 Q