3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar {} } namespace Other { use Foo\Bar; class Baz { function test($instance) { var_dump($instance instanceof Bar); } } $other = new Baz; $other->test(new Bar); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9oblX
function name:  (null)
number of ops:  9
compiled vars:  !0 = $other
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Other%5CBaz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'test'
          4        NEW                                              $4      'Foo%5CBar'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
   17     8      > RETURN                                                   1

Class Foo\Bar: [no user functions]
Class Other\Baz:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9oblX
function name:  test
number of ops:  6
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_NS_FCALL_BY_NAME                                    'Other%5Cvar_dump'
          2        INSTANCEOF                                       ~1      !0, 'Foo%5CBar'
          3        SEND_VAL_EX                                              ~1
          4        DO_FCALL                                      0          
   12     5      > RETURN                                                   null

End of function test

End of class Other\Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.07 ms | 1395 KiB | 15 Q