3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Something { public $nothing; public function hasThingie() { return $this->nothing === null; } public function setThingie() { $this->nothing = 'thingy'; } } $thing = new Something; var_dump($this->hasThingie()); $thing->setThingie(); var_dump($this->hasThingie());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vji4F
function name:  (null)
number of ops:  18
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Something'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_FCALL                                               'var_dump'
          4        FETCH_THIS                                       $4      
          5        INIT_METHOD_CALL                                         $4, 'hasThingie'
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
   20     9        INIT_METHOD_CALL                                         !0, 'setThingie'
         10        DO_FCALL                                      0          
   21    11        INIT_FCALL                                               'var_dump'
         12        FETCH_THIS                                       $8      
         13        INIT_METHOD_CALL                                         $8, 'hasThingie'
         14        DO_FCALL                                      0  $9      
         15        SEND_VAR                                                 $9
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class Something:
Function hasthingie:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vji4F
function name:  hasThingie
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      'nothing'
          1        TYPE_CHECK                                    2  ~1      ~0
          2      > RETURN                                                   ~1
    9     3*     > RETURN                                                   null

End of function hasthingie

Function setthingie:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vji4F
function name:  setThingie
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN_OBJ                                               'nothing'
          1        OP_DATA                                                  'thingy'
   14     2      > RETURN                                                   null

End of function setthingie

End of class Something.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.58 ms | 1388 KiB | 15 Q