3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Bah {} abstract class Test implements Bah { protected $pro = 9; public function __construct($x) { } } class TestMe extends Test { protected $pro = 50; } class TestProxy extends Test { protected $a; public function __construct($x, $a = null) { echo $a->pro; } } $a = new TestMe(''); $p = new TestProxy('', $a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1OH5S
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'test'
   12     1        DECLARE_CLASS                                            'testme', 'test'
   17     2        DECLARE_CLASS                                            'testproxy', 'test'
   24     3        NEW                                              $2      'TestMe'
          4        SEND_VAL_EX                                              ''
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   25     7        NEW                                              $5      'TestProxy'
          8        SEND_VAL_EX                                              ''
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $5
         12      > RETURN                                                   1

Class Bah: [no user functions]
Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1OH5S
function name:  __construct
number of ops:  2
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1      > RETURN                                                   null

End of function __construct

End of class Test.

Class TestMe: [no user functions]
Class TestProxy:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1OH5S
function name:  __construct
number of ops:  5
compiled vars:  !0 = $x, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
   20     2        FETCH_OBJ_R                                      ~2      !1, 'pro'
          3        ECHO                                                     ~2
   21     4      > RETURN                                                   null

End of function __construct

End of class TestProxy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.32 ms | 1394 KiB | 13 Q