3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface UriInterface { /** * @return self */ public function withHost($value); } interface Uri2Interface { public function withHost(string $value) : self; } class UriImplementingV1UsingTypeHintsFromV2 implements UriInterface { private $host; public function withHost(string $value) : self { $clone = clone $this; $clone->host = $value; return $clone; } } class UriImplementingV2WithoutTypeHints implements Uri2Interface { private $host; public function withHost($value) { $clone = clone $this; $clone->host = $value; return $clone; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JbEJI
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   DECLARE_CLASS                                                'uriimplementingv1usingtypehintsfromv2'
   28     1        DECLARE_CLASS                                                'uriimplementingv2withouttypehints'
   38     2      > RETURN                                                       1

Class UriInterface:
Function withhost:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JbEJI
function name:  withHost
number of ops:  2
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of function withhost

End of class UriInterface.

Class Uri2Interface:
Function withhost:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JbEJI
function name:  withHost
number of ops:  3
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
          1        VERIFY_RETURN_TYPE                                           
          2      > RETURN                                                       null

End of function withhost

End of class Uri2Interface.

Class UriImplementingV1UsingTypeHintsFromV2:
Function withhost:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JbEJI
function name:  withHost
number of ops:  10
compiled vars:  !0 = $value, !1 = $clone
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   RECV                                                 !0      
   22     1        FETCH_THIS                                           ~2      
          2        CLONE                                                ~3      ~2
          3        ASSIGN                                                       !1, ~3
   23     4        ASSIGN_OBJ                                                   !1, 'host'
          5        OP_DATA                                                      !0
   24     6        VERIFY_RETURN_TYPE                                           !1
          7      > RETURN                                                       !1
   25     8*       VERIFY_RETURN_TYPE                                           
          9*     > RETURN                                                       null

End of function withhost

End of class UriImplementingV1UsingTypeHintsFromV2.

Class UriImplementingV2WithoutTypeHints:
Function withhost:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JbEJI
function name:  withHost
number of ops:  8
compiled vars:  !0 = $value, !1 = $clone
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   32     0  E >   RECV                                                 !0      
   34     1        FETCH_THIS                                           ~2      
          2        CLONE                                                ~3      ~2
          3        ASSIGN                                                       !1, ~3
   35     4        ASSIGN_OBJ                                                   !1, 'host'
          5        OP_DATA                                                      !0
   36     6      > RETURN                                                       !1
   37     7*     > RETURN                                                       null

End of function withhost

End of class UriImplementingV2WithoutTypeHints.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.77 ms | 2097 KiB | 13 Q