3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function a($x) { var_dump($x instanceof self); } } class Bar extends Foo {} Foo::a("foo"); Bar::a("foo"); Foo::a("bar"); Foo::a("baz");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oqBOq
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'a'
          1        SEND_VAL                                                 'foo'
          2        DO_FCALL                                      0          
   11     3        INIT_STATIC_METHOD_CALL                                  'Bar', 'a'
          4        SEND_VAL                                                 'foo'
          5        DO_FCALL                                      0          
   12     6        INIT_STATIC_METHOD_CALL                                  'Foo', 'a'
          7        SEND_VAL                                                 'bar'
          8        DO_FCALL                                      0          
   13     9        INIT_STATIC_METHOD_CALL                                  'Foo', 'a'
         10        SEND_VAL                                                 'baz'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

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

End of function a

End of class Foo.

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

End of function a

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.08 ms | 1396 KiB | 15 Q