3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Test { public function test(self $other); } class TestImpl implements Test { public function test(self $other) { // Uh oh... some PHP's dont agree echo var_export($other, true) . "\n"; } } $a = new TestImpl(); $b = new TestImpl(); $a->test($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v6oKi
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'testimpl'
   17     1        NEW                                              $2      'TestImpl'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   18     4        NEW                                              $5      'TestImpl'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   20     7        INIT_METHOD_CALL                                         !0, 'test'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

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

End of function test

End of class Test.

Class TestImpl:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v6oKi
function name:  test
number of ops:  8
compiled vars:  !0 = $other
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'var_export'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $1      
          5        CONCAT                                           ~2      $1, '%0A'
          6        ECHO                                                     ~2
   14     7      > RETURN                                                   null

End of function test

End of class TestImpl.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.18 ms | 1395 KiB | 15 Q