3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function test($a) { return $a instanceof self; } } $a = new A; $b = new A; var_dump($a->test($b), $a->test(new stdClass));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6PMn5
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        NEW                                              $5      'A'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   12     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'test'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $8      
         10        SEND_VAR                                                 $8
         11        INIT_METHOD_CALL                                         !0, 'test'
         12        NEW                                              $9      'stdClass'
         13        DO_FCALL                                      0          
         14        SEND_VAR_NO_REF_EX                                       $9
         15        DO_FCALL                                      0  $11     
         16        SEND_VAR                                                 $11
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Class A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6PMn5
function name:  test
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INSTANCEOF                                       ~1      !0
          2      > RETURN                                                   ~1
    6     3*     > RETURN                                                   null

End of function test

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.19 ms | 1395 KiB | 15 Q