3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface fooface {} function needsfoo( fooface $foo ) { return true ; } var_dump( needsfoo( new class implements fooface {} ) ) ;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d5ZsM
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'needsfoo'
          2        DECLARE_ANON_CLASS                               <array> 
          3        NEW                                              $1      $0
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $1
          6        DO_FCALL                                      0  $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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

End of function needsfoo

Class fooface: [no user functions]
Class fooface@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.22 ms | 1397 KiB | 16 Q