3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_set(& $v) { return $v !== null; } $var = '$var IS SET'; if(is_set($var)) { echo $var; } else { echo '$var is not set' ; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B5fLl
function name:  (null)
number of ops:  9
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, '%24var+IS+SET'
    9     1        INIT_FCALL                                               'is_set'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0  $2      
          4      > JMPZ                                                     $2, ->7
   10     5    >   ECHO                                                     !0
          6      > JMP                                                      ->8
   12     7    >   ECHO                                                     '%24var+is+not+set'
   13     8    > > RETURN                                                   1

Function is_set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B5fLl
function name:  is_set
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        TYPE_CHECK                                  1020  ~1      !0
          2      > RETURN                                                   ~1
    5     3*     > RETURN                                                   null

End of function is_set

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.12 ms | 1389 KiB | 14 Q