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; print $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/S07j8
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $1      'b'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   30     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/S07j8
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/S07j8
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   ECHO                                                     '%0A'
   24     1        FETCH_OBJ_R                                      ~0      'action'
          2        ECHO                                                     ~0
   25     3      > RETURN                                                   null

End of function test

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172 ms | 1398 KiB | 13 Q