3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Fooer { private $bar; public function cleanBar() { unset($this->bar); } public function doThings() { if ($this->bar) { return 'things'; } return 'no things!'; } } $foo = new Fooer(); $foo->cleanBar(); var_dump('no things!' === $foo->doThings());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2mN6S
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'Fooer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'cleanBar'
          4        DO_FCALL                                      0          
   15     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !0, 'doThings'
          7        DO_FCALL                                      0  $5      
          8        IS_IDENTICAL                                     ~6      $5, 'no+things%21'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class Fooer:
Function cleanbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2mN6S
function name:  cleanBar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   UNSET_OBJ                                                'bar'
          1      > RETURN                                                   null

End of function cleanbar

Function dothings:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2mN6S
function name:  doThings
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      'bar'
          1      > JMPZ                                                     ~0, ->3
          2    > > RETURN                                                   'things'
          3    > > RETURN                                                   'no+things%21'
          4*     > RETURN                                                   null

End of function dothings

End of class Fooer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.28 ms | 1395 KiB | 15 Q