3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace forum; class Base { public function __construct($a, $b) { } public function sayHello() { echo 'Hello '; } } class SayWorld extends Base { public function __construct($a, $b, $c = 1) { parent ::__construct($a, $b); echo $c . " "; } public function sayHello($a = null) { parent ::sayHello(); echo 'World!'; } } class MyHelloWorld extends SayWorld { } $o = new MyHelloWorld(2, 3); $o -> sayHello(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ig5Dc
function name:  (null)
number of ops:  9
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'forum%5CMyHelloWorld'
          1        SEND_VAL_EX                                              2
          2        SEND_VAL_EX                                              3
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   28     5        INIT_METHOD_CALL                                         !0, 'sayHello'
          6        SEND_VAL_EX                                              1
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class forum\Base:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ig5Dc
function name:  __construct
number of ops:  3
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2      > 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/ig5Dc
function name:  sayHello
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'Hello+'
   10     1      > RETURN                                                   null

End of function sayhello

End of class forum\Base.

Class forum\SayWorld:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ig5Dc
function name:  __construct
number of ops:  10
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      1
   15     3        INIT_STATIC_METHOD_CALL                                  
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
   16     7        CONCAT                                           ~4      !2, '+'
          8        ECHO                                                     ~4
   18     9      > 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/ig5Dc
function name:  sayHello
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV_INIT                                        !0      null
   21     1        INIT_STATIC_METHOD_CALL                                  'sayHello'
          2        DO_FCALL                                      0          
   22     3        ECHO                                                     'World%21'
   23     4      > RETURN                                                   null

End of function sayhello

End of class forum\SayWorld.

Class forum\MyHelloWorld:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ig5Dc
function name:  __construct
number of ops:  10
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      1
   15     3        INIT_STATIC_METHOD_CALL                                  
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
   16     7        CONCAT                                           ~4      !2, '+'
          8        ECHO                                                     ~4
   18     9      > 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/ig5Dc
function name:  sayHello
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV_INIT                                        !0      null
   21     1        INIT_STATIC_METHOD_CALL                                  'sayHello'
          2        DO_FCALL                                      0          
   22     3        ECHO                                                     'World%21'
   23     4      > RETURN                                                   null

End of function sayhello

End of class forum\MyHelloWorld.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.47 ms | 1407 KiB | 14 Q