3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public function a(){ $this->isEmpty = 1; var_dump(property_exists($this, 'isEmpty')); unset($this->isEmpty); var_dump(property_exists($this, 'isEmpty')); } } $t = new test(); $t->a(); class test2 { public $isEmpty; public function a(){ $this->isEmpty = 1; var_dump(property_exists($this, 'isEmpty')); unset($this->isEmpty); var_dump(property_exists($this, 'isEmpty')); } } $t = new test2(); $t->a(); class test3 { public $isEmpty; public function a(){ $this->isEmpty = 1; var_dump(isset($this->isEmpty)); unset($this->isEmpty); var_dump(isset($this->isEmpty)); } } $t = new test3(); $t->a();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kBBBd
function name:  (null)
number of ops:  16
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'a'
          4        DO_FCALL                                      0          
   25     5        NEW                                              $5      'test2'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $5
   26     8        INIT_METHOD_CALL                                         !0, 'a'
          9        DO_FCALL                                      0          
   38    10        NEW                                              $9      'test3'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !0, $9
   39    13        INIT_METHOD_CALL                                         !0, 'a'
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Class test:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kBBBd
function name:  a
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN_OBJ                                               'isEmpty'
          1        OP_DATA                                                  1
    7     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'property_exists'
          4        FETCH_THIS                                       ~1      
          5        SEND_VAL                                                 ~1
          6        SEND_VAL                                                 'isEmpty'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
    8    10        UNSET_OBJ                                                'isEmpty'
    9    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'property_exists'
         13        FETCH_THIS                                       ~4      
         14        SEND_VAL                                                 ~4
         15        SEND_VAL                                                 'isEmpty'
         16        DO_ICALL                                         $5      
         17        SEND_VAR                                                 $5
         18        DO_ICALL                                                 
   10    19      > RETURN                                                   null

End of function a

End of class test.

Class test2:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kBBBd
function name:  a
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN_OBJ                                               'isEmpty'
          1        OP_DATA                                                  1
   20     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'property_exists'
          4        FETCH_THIS                                       ~1      
          5        SEND_VAL                                                 ~1
          6        SEND_VAL                                                 'isEmpty'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
   21    10        UNSET_OBJ                                                'isEmpty'
   22    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'property_exists'
         13        FETCH_THIS                                       ~4      
         14        SEND_VAL                                                 ~4
         15        SEND_VAL                                                 'isEmpty'
         16        DO_ICALL                                         $5      
         17        SEND_VAR                                                 $5
         18        DO_ICALL                                                 
   23    19      > RETURN                                                   null

End of function a

End of class test2.

Class test3:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kBBBd
function name:  a
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   ASSIGN_OBJ                                               'isEmpty'
          1        OP_DATA                                                  1
   33     2        INIT_FCALL                                               'var_dump'
          3        ISSET_ISEMPTY_PROP_OBJ                           ~1      'isEmpty'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
   34     6        UNSET_OBJ                                                'isEmpty'
   35     7        INIT_FCALL                                               'var_dump'
          8        ISSET_ISEMPTY_PROP_OBJ                           ~3      'isEmpty'
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
   36    11      > RETURN                                                   null

End of function a

End of class test3.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.28 ms | 1016 KiB | 15 Q