3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public static function fromScalar($scalar); } class Bar implements Foo { public static function fromScalar($scalar) { echo 'Hello' . PHP_EOL; } } class Baz implements Foo { } Bar::fromScalar('hello'); Baz::fromScalar('hello');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j74Hm
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'bar'
   13     1        DECLARE_CLASS                                            'baz'
   17     2        INIT_STATIC_METHOD_CALL                                  'Bar', 'fromScalar'
          3        SEND_VAL_EX                                              'hello'
          4        DO_FCALL                                      0          
   18     5        INIT_STATIC_METHOD_CALL                                  'Baz', 'fromScalar'
          6        SEND_VAL_EX                                              'hello'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class Foo:
Function fromscalar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j74Hm
function name:  fromScalar
number of ops:  2
compiled vars:  !0 = $scalar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function fromscalar

End of class Foo.

Class Bar:
Function fromscalar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j74Hm
function name:  fromScalar
number of ops:  3
compiled vars:  !0 = $scalar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        ECHO                                                     'Hello%0A'
   10     2      > RETURN                                                   null

End of function fromscalar

End of class Bar.

Class Baz: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.84 ms | 1393 KiB | 13 Q