3v4l.org

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

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

End of function bar

End of class FooInterface.

Class FooInterface@anonymous:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/afrlr
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                   'Works%21'
   15     1*     > RETURN                                                   null

End of function bar

End of class FooInterface@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.15 ms | 1399 KiB | 15 Q