3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Identity { /** * Named c * * @param string $identifier * @return self */ public static function createIdentity(): Identity; } class A implements Identity { public static function createIdentity(): Identity { return new self; } } $a = A::createIdentity(); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UWtXC
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   DECLARE_CLASS                                            'a'
   22     1        INIT_STATIC_METHOD_CALL                                  'A', 'createIdentity'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   23     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Class Identity:
Function createidentity:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UWtXC
function name:  createIdentity
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function createidentity

End of class Identity.

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

End of function createidentity

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.35 ms | 1395 KiB | 15 Q