3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new Object(); $a->lead = Object(); $a->lead->name = 'cool'; if(isset($a->lead->name)){ echo '1'; } if(isset($a->lead->referral)){ echo '2'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 14
filename:       /in/stMdS
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'Object'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    3     3        INIT_FCALL_BY_NAME                                       'Object'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN_OBJ                                               !0, 'lead'
          6        OP_DATA                                                  $5
    4     7        FETCH_OBJ_W                                      $6      !0, 'lead'
          8        ASSIGN_OBJ                                               $6, 'name'
          9        OP_DATA                                                  'cool'
    6    10        FETCH_OBJ_IS                                     ~8      !0, 'lead'
         11        ISSET_ISEMPTY_PROP_OBJ                                   ~8, 'name'
         12      > JMPZ                                                     ~9, ->14
    7    13    >   ECHO                                                     '1'
   10    14    >   FETCH_OBJ_IS                                     ~10     !0, 'lead'
         15        ISSET_ISEMPTY_PROP_OBJ                                   ~10, 'referral'
         16      > JMPZ                                                     ~11, ->18
   11    17    >   ECHO                                                     '2'
   12    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.37 ms | 1394 KiB | 13 Q