3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeClass { public $_someMember; public function __construct() { $this->_someMember = 1; } public static function getSomethingStatic() { $object = new self(); return $object->_someMember * 5; // here's the catch } } echo SomeClass::getSomethingStatic();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IHDnX
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'SomeClass', 'getSomethingStatic'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Class SomeClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IHDnX
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               '_someMember'
          1        OP_DATA                                                  1
   10     2      > RETURN                                                   null

End of function __construct

Function getsomethingstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IHDnX
function name:  getSomethingStatic
number of ops:  7
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                          self                $1      
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        FETCH_OBJ_R                                      ~4      !0, '_someMember'
          4        MUL                                              ~5      ~4, 5
          5      > RETURN                                                   ~5
   16     6*     > RETURN                                                   null

End of function getsomethingstatic

End of class SomeClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.13 ms | 1393 KiB | 13 Q