3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function __construct(){ echo "JIUAA".PHP_EOL; } } class B extends A { function B(){ echo "XIABB".PHP_EOL; } function __toString() { $this->B(); } } echo new B();
based on 1WJ3q
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bg5m1
function name:  (null)
number of ops:  7
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   9     1        NOP                                                      
         2        NOP                                                      
  19     3        NEW                                              $3      :-3
         4        DO_FCALL                                      0          
         5        ECHO                                                     $3
         6      > RETURN                                                   1

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

End of function __construct

End of class A.

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

End of function b

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bg5m1
function name:  __toString
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  16     0  E >   INIT_METHOD_CALL                                         'B'
         1        DO_FCALL                                      0          
  17     2      > RETURN                                                   null

End of function __tostring

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

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 7.3.0