3v4l.org

run code in 300+ PHP versions simultaneously
<?php Interface wut { public function foo( $yolo ); } class dude implements wut { public function foo ( $yolo ): string { return $yolo; } } $x = new dude(); echo $x->foo(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kJ0Ee
function name:  (null)
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'dude'
   13     1        NEW                                              $1      'dude'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   14     4        INIT_METHOD_CALL                                         !0, 'foo'
          5        SEND_VAL_EX                                              2
          6        DO_FCALL                                      0  $4      
          7        ECHO                                                     $4
          8      > RETURN                                                   1

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

End of function foo

End of class wut.

Class dude:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kJ0Ee
function name:  foo
number of ops:  5
compiled vars:  !0 = $yolo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        VERIFY_RETURN_TYPE                                       !0
          2      > RETURN                                                   !0
   10     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function foo

End of class dude.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.23 ms | 1394 KiB | 13 Q