3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function __construct(){ echo "JIUAA".PHP_EOL; } } class B extends A { function B(){ $str = "XIABB".PHP_EOL; return "\nxBBx\n"; } function __toString() { $this->B(); } } echo new B();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TvmIn
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'b', 'a'
   20     1        NEW                                              $0      'B'
          2        DO_FCALL                                      0          
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TvmIn
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/TvmIn
function name:  B
number of ops:  3
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'XIABB%0A'
   12     1      > RETURN                                                   '%0AxBBx%0A'
   13     2*     > 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/TvmIn
function name:  __toString
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_METHOD_CALL                                         'B'
          1        DO_FCALL                                      0          
   18     2        VERIFY_RETURN_TYPE                                       
          3      > RETURN                                                   null

End of function __tostring

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.49 ms | 1394 KiB | 13 Q