3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Math{ public function show($item1){ return $item1 + 10; } } class MyClass{ use Math; } $my = new MyClass(); echo $my->show(10); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i5cqr
function name:  (null)
number of ops:  9
compiled vars:  !0 = $my
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'myclass'
   11     1        NEW                                              $1      'MyClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   12     4        INIT_METHOD_CALL                                         !0, 'show'
          5        SEND_VAL_EX                                              10
          6        DO_FCALL                                      0  $4      
          7        ECHO                                                     $4
   14     8      > RETURN                                                   1

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

End of function show

End of class Math.

Class MyClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.53 ms | 1393 KiB | 13 Q