3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; interface Bar {} class Baz implements \Foo\Bar {} $arr = class_implements("\\Foo\\Bar"); var_dump(in_array("\\Foo\\Bar", $arr)); var_dump(in_array("Bar", $arr));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qv0Wn
function name:  (null)
number of ops:  20
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'foo%5Cbaz'
    5     1        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cclass_implements'
          2        SEND_VAL_EX                                              '%5CFoo%5CBar'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
    6     5        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
          6        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cin_array'
          7        SEND_VAL_EX                                              '%5CFoo%5CBar'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $3      
         10        SEND_VAR_NO_REF_EX                                       $3
         11        DO_FCALL                                      0          
    7    12        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
         13        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cin_array'
         14        SEND_VAL_EX                                              'Bar'
         15        SEND_VAR_EX                                              !0
         16        DO_FCALL                                      0  $5      
         17        SEND_VAR_NO_REF_EX                                       $5
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

Class Foo\Bar: [no user functions]
Class Foo\Baz: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.4 ms | 1386 KiB | 19 Q