3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface foo{ function bar($yolo = true); } class testClass implements foo { function bar($yolo = 'swag') { echo "yolo" . $yolo; } } $test = new testClass(); $test->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mC7As
function name:  (null)
number of ops:  7
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'testclass'
   18     1        NEW                                              $1      'testClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   20     4        INIT_METHOD_CALL                                         !0, 'bar'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function bar

End of class foo.

Class testClass:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mC7As
function name:  bar
number of ops:  4
compiled vars:  !0 = $yolo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV_INIT                                        !0      'swag'
   12     1        CONCAT                                           ~1      'yolo', !0
          2        ECHO                                                     ~1
   13     3      > RETURN                                                   null

End of function bar

End of class testClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.79 ms | 1394 KiB | 13 Q