3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { function name(string $s, ?array $a = null); } class B implements A { function name(string $s, array $a = null) { echo $s; } } (new B)->name('s');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6T9GB
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'b'
   14     1        NEW                                              $0      'B'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'name'
          4        SEND_VAL_EX                                              's'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function name

End of class A.

Class B:
Function name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6T9GB
function name:  name
number of ops:  4
compiled vars:  !0 = $s, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    9     2        ECHO                                                     !0
   10     3      > RETURN                                                   null

End of function name

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.21 ms | 1423 KiB | 13 Q