3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HelloWorld { readonly public string $say; public function __construct() { $this->say = 'Hello World'; } } class HelloNewWorld extends HelloWorld { readonly public string $say; public function __construct() { $this->say = 'Hello New World'; } } echo (new HelloWorld())->say . PHP_EOL; echo (new HelloNewWorld())->say . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQQ08
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $0      'HelloWorld'
          1        DO_FCALL                                      0          
          2        FETCH_OBJ_R                                      ~2      $0, 'say'
          3        CONCAT                                           ~3      ~2, '%0A'
          4        ECHO                                                     ~3
   24     5        NEW                                              $4      'HelloNewWorld'
          6        DO_FCALL                                      0          
          7        FETCH_OBJ_R                                      ~6      $4, 'say'
          8        CONCAT                                           ~7      ~6, '%0A'
          9        ECHO                                                     ~7
   25    10      > RETURN                                                   1

Class HelloWorld:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQQ08
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               'say'
          1        OP_DATA                                                  'Hello+World'
   10     2      > RETURN                                                   null

End of function __construct

End of class HelloWorld.

Class HelloNewWorld:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQQ08
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN_OBJ                                               'say'
          1        OP_DATA                                                  'Hello+New+World'
   20     2      > RETURN                                                   null

End of function __construct

End of class HelloNewWorld.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.69 ms | 995 KiB | 13 Q