3v4l.org

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

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

End of function test

End of class A.

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

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.7 ms | 1393 KiB | 13 Q