3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private int $foo; private int $bar = 1; public function propertyInitialized($name): bool { return property_exists($this, $name) && isset($this->$name); } } $foo = new foo; var_dump($foo->propertyInitialized('foo'), $foo->propertyInitialized('bar'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lfpJG
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'propertyInitialized'
          5        SEND_VAL_EX                                              'foo'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        INIT_METHOD_CALL                                         !0, 'propertyInitialized'
          9        SEND_VAL_EX                                              'bar'
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Foo:
Function propertyinitialized:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/lfpJG
function name:  propertyInitialized
number of ops:  13
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'property_exists'
          2        FETCH_THIS                                       ~1      
          3        SEND_VAL                                                 ~1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > JMPZ_EX                                          ~3      $2, ->9
          7    >   ISSET_ISEMPTY_PROP_OBJ                           ~4      !0
          8        BOOL                                             ~3      ~4
          9    >   VERIFY_RETURN_TYPE                                       ~3
         10      > RETURN                                                   ~3
   10    11*       VERIFY_RETURN_TYPE                                       
         12*     > RETURN                                                   null

End of function propertyinitialized

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.45 ms | 1396 KiB | 17 Q