3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace Foo\Bar\String; interface I {} class A implements I {} class B implements I {} class C implements I {} use Foo\Bar\String as MyString; function test(MyString\I $o) { var_dump($o::class); } test(new A()); test(new B()); test(new C());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q9Fbi
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                                'foo%5Cbar%5Cstring%5Ca'
    8     1        DECLARE_CLASS                                                'foo%5Cbar%5Cstring%5Cb'
    9     2        DECLARE_CLASS                                                'foo%5Cbar%5Cstring%5Cc'
   17     3        INIT_NS_FCALL_BY_NAME                                        'Foo%5CBar%5CString%5Ctest'
          4        NEW                                                  $0      'Foo%5CBar%5CString%5CA'
          5        DO_FCALL                                          0          
          6        SEND_VAR_NO_REF_EX                                           $0
          7        DO_FCALL                                          0          
   18     8        INIT_NS_FCALL_BY_NAME                                        'Foo%5CBar%5CString%5Ctest'
          9        NEW                                                  $3      'Foo%5CBar%5CString%5CB'
         10        DO_FCALL                                          0          
         11        SEND_VAR_NO_REF_EX                                           $3
         12        DO_FCALL                                          0          
   19    13        INIT_NS_FCALL_BY_NAME                                        'Foo%5CBar%5CString%5Ctest'
         14        NEW                                                  $6      'Foo%5CBar%5CString%5CC'
         15        DO_FCALL                                          0          
         16        SEND_VAR_NO_REF_EX                                           $6
         17        DO_FCALL                                          0          
         18      > RETURN                                                       1

Function foo%5Cbar%5Cstring%5Ctest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q9Fbi
function name:  Foo\Bar\String\test
number of ops:  6
compiled vars:  !0 = $o
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
   14     1        INIT_NS_FCALL_BY_NAME                                        'Foo%5CBar%5CString%5Cvar_dump'
          2        FETCH_CLASS_NAME                                     ~1      !0
          3        SEND_VAL_EX                                                  ~1
          4        DO_FCALL                                          0          
   15     5      > RETURN                                                       null

End of function foo%5Cbar%5Cstring%5Ctest

Class Foo\Bar\String\I: [no user functions]
Class Foo\Bar\String\A: [no user functions]
Class Foo\Bar\String\B: [no user functions]
Class Foo\Bar\String\C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
115.96 ms | 496 KiB | 13 Q