3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict=1); class Test { } class A { public function abc(): Test { return new Test(); } } $b = new A; print_r([ $b->abc() ]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l19uC
function name:  (null)
number of ops:  10
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_FCALL                                               'print_r'
   17     4        INIT_METHOD_CALL                                         !0, 'abc'
          5        DO_FCALL                                      0  $4      
          6        INIT_ARRAY                                       ~5      $4
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                                 
   18     9      > RETURN                                                   1

Class Test: [no user functions]
Class A:
Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l19uC
function name:  abc
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $0      'Test'
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
   11     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function abc

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.99 ms | 1395 KiB | 15 Q