3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ public function __construct($b) { if($b) return new B(); } public function doSomethig() { echo 'A class."\n"'; } } class B{ public function __construct() { echo 'buidling B'."\n"; } public function doSomethig() { echo 'B class."\n"'; } } $c = new A(true); var_dump($c); $c->doSomething();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A5ZWO
function name:  (null)
number of ops:  10
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'A'
          1        SEND_VAL_EX                                              <true>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   27     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   28     7        INIT_METHOD_CALL                                         !0, 'doSomething'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A5ZWO
function name:  __construct
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1      > JMPZ                                                     !0, ->5
    7     2    >   NEW                                              $1      'B'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $1
    8     5    > > RETURN                                                   null

End of function __construct

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

End of function dosomethig

End of class A.

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

End of function __construct

Function dosomethig:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A5ZWO
function name:  doSomethig
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ECHO                                                     'B+class.%22%5Cn%22'
   23     1      > RETURN                                                   null

End of function dosomethig

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.59 ms | 1388 KiB | 15 Q