3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { function bar($a, $b): void; } class Baz implements Foo { function bar($b, $c): void { var_dump([$b, $c]); } } call_user_func_array([(new Baz), 'bar'], ['c' => 123, 'b' => 456]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ndaLt
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'baz'
   13     1        NEW                                              $0      'Baz'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~2      $0
          4        ADD_ARRAY_ELEMENT                                ~2      'bar'
          5        INIT_USER_CALL                                0          'call_user_func_array', ~2
          6        SEND_ARRAY                                               <array>
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function bar

End of class Foo.

Class Baz:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ndaLt
function name:  bar
number of ops:  8
compiled vars:  !0 = $b, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_FCALL                                               'var_dump'
          3        INIT_ARRAY                                       ~2      !0
          4        ADD_ARRAY_ELEMENT                                ~2      !1
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
          7      > RETURN                                                   null

End of function bar

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.86 ms | 1395 KiB | 15 Q