3v4l.org

run code in 500+ PHP versions simultaneously
<?php class B { public string $hello = "world"; } class Test { public string $test = "B"; public function test() { return "B"; } } $class = new Test(); $test = new $class->test; echo $test->hello;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mcSNH
function name:  (null)
number of ops:  11
compiled vars:  !0 = $class, !1 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   NEW                                                  $2      'Test'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   17     3        FETCH_OBJ_R                                          ~5      !0, 'test'
          4        FETCH_CLASS                                       0  $6      ~5
          5        NEW                                                  $7      $6
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $7
   19     8        FETCH_OBJ_R                                          ~10     !1, 'hello'
          9        ECHO                                                         ~10
   20    10      > RETURN                                                       1

Class B: [no user functions]
Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mcSNH
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                       'B'
   12     1*     > RETURN                                                       null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.14 ms | 1582 KiB | 13 Q