3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { private $action = 'a'; } class b extends a { public function __construct() { $this->action = 'b'; print $this->action; } public function test() { print PHP_EOL. $this->action; } } $b = new b; $b->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k6ZJS
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $1      'b'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   29     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class a: [no user functions]
Class b:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k6ZJS
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN_OBJ                                               'action'
          1        OP_DATA                                                  'b'
   17     2        FETCH_OBJ_R                                      ~1      'action'
          3        ECHO                                                     ~1
   18     4      > RETURN                                                   null

End of function __construct

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

End of function test

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.15 ms | 1393 KiB | 13 Q