3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait EndpointInjector { public function test($str) { echo $str; } } class Endpoint { use EndpointInjector; public function test($str) { echo $str . '2'; } } $ep = new Endpoint(); $ep->test('hello world');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KRnFU
function name:  (null)
number of ops:  8
compiled vars:  !0 = $ep
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'endpoint'
   21     1        NEW                                              $1      'Endpoint'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   22     4        INIT_METHOD_CALL                                         !0, 'test'
          5        SEND_VAL_EX                                              'hello+world'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function test

End of class EndpointInjector.

Class Endpoint:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KRnFU
function name:  test
number of ops:  4
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        CONCAT                                           ~1      !0, '2'
          2        ECHO                                                     ~1
   18     3      > RETURN                                                   null

End of function test

End of class Endpoint.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
126.53 ms | 1398 KiB | 13 Q