3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public function copy(): MyClass { return new self(); } } $o = new MyClass; $b = $o->copy();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uWRel
function name:  (null)
number of ops:  7
compiled vars:  !0 = $o, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   12     3        INIT_METHOD_CALL                                         !0, 'copy'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
          6      > RETURN                                                   1

Class MyClass:
Function copy:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uWRel
function name:  copy
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                          self                $0      
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
    8     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function copy

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.78 ms | 1393 KiB | 13 Q