3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait MauricioTrait { public function sumStuff($a, $b) { return $a + $b; } public function multiplyStuff($a, $b) { return $a * $b; } } class MauricioClass { use MauricioTrait; public function printStuff() { return "Hello world!"; } } var_dump(in_array('MauricioTrait', class_uses('MauricioClass')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NWMie
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'mauricioclass'
   13     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'in_array'
          3        SEND_VAL                                                 'MauricioTrait'
          4        INIT_FCALL                                               'class_uses'
          5        SEND_VAL                                                 'MauricioClass'
          6        DO_ICALL                                         $0      
          7        SEND_VAR                                                 $0
          8        DO_ICALL                                         $1      
          9        SEND_VAR                                                 $1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function sumstuff

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

End of function multiplystuff

End of class MauricioTrait.

Class MauricioClass:
Function printstuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NWMie
function name:  printStuff
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   'Hello+world%21'
          1*     > RETURN                                                   null

End of function printstuff

End of class MauricioClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.45 ms | 1396 KiB | 19 Q