3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $x; public function __get($name) { echo "getting $name\n"; } public static function test($a) { $a->x; } } $a = new A(); A::test($a); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JKcER
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_STATIC_METHOD_CALL                                  'A', 'test'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   18     6      > RETURN                                                   1

Class A:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JKcER
function name:  __get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ROPE_INIT                                     3  ~2      'getting+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
    8     5      > RETURN                                                   null

End of function __get

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JKcER
function name:  test
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        FETCH_OBJ_R                                      ~1      !0, 'x'
          2        FREE                                                     ~1
   12     3      > RETURN                                                   null

End of function test

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.78 ms | 1394 KiB | 13 Q