3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class lol { private function __construct() {} protected function sayHello() { echo "Hello"; } } class rofl extends lol { public function __construct() { echo "hi"; } public function sayHello() { parent::sayHello(); echo "Not hello"; } } $thing = new rofl(); $thing->sayHello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZMZNW
function name:  (null)
number of ops:  6
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'rofl'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'sayHello'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class lol:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZMZNW
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of function __construct

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

End of function sayhello

End of class lol.

Class rofl:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZMZNW
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'hi'
   14     1      > RETURN                                                   null

End of function __construct

Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZMZNW
function name:  sayHello
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'sayHello'
          1        DO_FCALL                                      0          
   18     2        ECHO                                                     'Not+hello'
   19     3      > RETURN                                                   null

End of function sayhello

End of class rofl.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.98 ms | 1395 KiB | 13 Q