3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Model { public function __isset($name) { return $name === 'foo'; } } $model = new Model(); $fooDefined = isset($model->foo); // true var_dump($fooDefined); $fooDefined = property_exists($model, 'foo') && $model->foo !== null; var_dump($fooDefined);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/LoWsb
function name:  (null)
number of ops:  18
compiled vars:  !0 = $model, !1 = $fooDefined
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   NEW                                                  $2      'Model'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   10     3        ISSET_ISEMPTY_PROP_OBJ                               ~5      !0, 'foo'
          4        ASSIGN                                                       !1, ~5
   12     5        INIT_FCALL                                                   'var_dump'
          6        SEND_VAR                                                     !1
          7        DO_ICALL                                                     
   14     8        FRAMELESS_ICALL_2                property_exists      ~8      !0, 'foo'
          9      > JMPZ_EX                                              ~8      ~8, ->13
         10    >   FETCH_OBJ_R                                          ~9      !0, 'foo'
         11        TYPE_CHECK                                      1020  ~10     ~9
         12        BOOL                                                 ~8      ~10
         13    >   ASSIGN                                                       !1, ~8
   16    14        INIT_FCALL                                                   'var_dump'
         15        SEND_VAR                                                     !1
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Class Model:
Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LoWsb
function name:  __isset
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
    5     1        IS_IDENTICAL                                         ~1      !0, 'foo'
          2      > RETURN                                                       ~1
    6     3*     > RETURN                                                       null

End of function __isset

End of class Model.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.63 ms | 1244 KiB | 14 Q