3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testStatic { var $myvar = 'blah'; function give() { if (isset($this)) { return $this->myvar; }else{ return self::$myvar; } } } echo testStatic::give();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NN3hL
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'testStatic', 'give'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Class testStatic:
Function give:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NN3hL
function name:  give
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ISSET_ISEMPTY_THIS                               ~0      
          1      > JMPZ                                                     ~0, ->5
    8     2    >   FETCH_OBJ_R                                      ~1      'myvar'
          3      > RETURN                                                   ~1
          4*       JMP                                                      ->7
   10     5    >   FETCH_STATIC_PROP_R          unknown             ~2      'myvar'
          6      > RETURN                                                   ~2
   12     7*     > RETURN                                                   null

End of function give

End of class testStatic.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.05 ms | 1393 KiB | 13 Q