3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class AbClass { const ABC = "12345"; public function printThing() { echo self::ABC . PHP_EOL; } } class Sub extends AbClass { protected $thing2; public function __construct() { $this->thing2 = "def"; } public function printThing() { parent::printThing(); echo ABC . PHP_EOL; echo $this->thing2 . PHP_EOL; } } $s = new Sub(); $s->printThing();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WEKJn
function name:  (null)
number of ops:  6
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'Sub'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'printThing'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class AbClass:
Function printthing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WEKJn
function name:  printThing
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     '12345%0A'
    8     1      > RETURN                                                   null

End of function printthing

End of class AbClass.

Class Sub:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WEKJn
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN_OBJ                                               'thing2'
          1        OP_DATA                                                  'def'
   16     2      > RETURN                                                   null

End of function __construct

Function printthing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WEKJn
function name:  printThing
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  'printThing'
          1        DO_FCALL                                      0          
   19     2        FETCH_CONSTANT                                   ~1      'ABC'
          3        CONCAT                                           ~2      ~1, '%0A'
          4        ECHO                                                     ~2
   20     5        FETCH_OBJ_R                                      ~3      'thing2'
          6        CONCAT                                           ~4      ~3, '%0A'
          7        ECHO                                                     ~4
   21     8      > RETURN                                                   null

End of function printthing

End of class Sub.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.78 ms | 1395 KiB | 13 Q