3v4l.org

run code in 300+ PHP versions simultaneously
<?php //interface Foo { // public function foo(String $foo) : String; //} class Bar implements Foo { public function foo(String $foo) { return new StdClass; } } $b = new Bar; var_dump($b->foo("test"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1WPYB
function name:  (null)
number of ops:  11
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'bar'
   13     1        NEW                                              $1      'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   15     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'foo'
          6        SEND_VAL_EX                                              'test'
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Bar:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1WPYB
function name:  foo
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        NEW                                              $1      'StdClass'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   $1
   10     4*     > RETURN                                                   null

End of function foo

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.86 ms | 1395 KiB | 15 Q