3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { protected $test; public function __construct() { $this->test = 'yow'; } protected function get() { echo 'here is your property: ' . $this->test; } public static function __callStatic($name, $arguments) { return call_user_func_array([new TestClass(), $name], $arguments); } } echo TestClass::get();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f2kAK
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   INIT_STATIC_METHOD_CALL                                  'TestClass', 'get'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

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

End of function __construct

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f2kAK
function name:  get
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_R                                      ~0      'test'
          1        CONCAT                                           ~1      'here+is+your+property%3A+', ~0
          2        ECHO                                                     ~1
   16     3      > RETURN                                                   null

End of function get

Function __callstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f2kAK
function name:  __callStatic
number of ops:  12
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   21     2        NEW                                              $2      'TestClass'
          3        DO_FCALL                                      0          
          4        INIT_ARRAY                                       ~4      $2
          5        ADD_ARRAY_ELEMENT                                ~4      !0
          6        INIT_USER_CALL                                0          'call_user_func_array', ~4
          7        SEND_ARRAY                                               !1
          8        CHECK_UNDEF_ARGS                                         
          9        DO_FCALL                                      0  $5      
         10      > RETURN                                                   $5
   22    11*     > RETURN                                                   null

End of function __callstatic

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.27 ms | 1395 KiB | 13 Q