3v4l.org

run code in 300+ PHP versions simultaneously
<?php class newClass { static $static_var = 111; public static function get_static_var() { echo self::$static_var.'<br>'; } } echo newClass::$static_var.'<br>'; $obj = new newClass; $obj->get_static_var(); $obj::get_static_var();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2l5Am
function name:  (null)
number of ops:  12
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_STATIC_PROP_R          unknown             ~1      'static_var'
          1        CONCAT                                           ~2      ~1, '%3Cbr%3E'
          2        ECHO                                                     ~2
   12     3        NEW                                              $3      'newClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
   13     6        INIT_METHOD_CALL                                         !0, 'get_static_var'
          7        DO_FCALL                                      0          
   14     8        FETCH_CLASS                                   0  $7      !0
          9        INIT_STATIC_METHOD_CALL                                  $7, 'get_static_var'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class newClass:
Function get_static_var:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2l5Am
function name:  get_static_var
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'static_var'
          1        CONCAT                                           ~1      ~0, '%3Cbr%3E'
          2        ECHO                                                     ~1
    7     3      > RETURN                                                   null

End of function get_static_var

End of class newClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.34 ms | 1393 KiB | 13 Q