3v4l.org

run code in 300+ PHP versions simultaneously
<?php function penjumlahan($data_angka) { $hasil = 0; foreach($data_angka as $index => $value) { $hasil = $hasil + $value; } return $hasil; } $kumpulan_angka = array(3,5,7,8,9); $hasil = penjumlahan($kumpulan_angka); echo $hasil;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pt3Vi
function name:  (null)
number of ops:  7
compiled vars:  !0 = $kumpulan_angka, !1 = $hasil
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'penjumlahan'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
   13     5        ECHO                                                     !1
          6      > RETURN                                                   1

Function penjumlahan:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/pt3Vi
function name:  penjumlahan
number of ops:  11
compiled vars:  !0 = $data_angka, !1 = $hasil, !2 = $value, !3 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 0
    5     2      > FE_RESET_R                                       $5      !0, ->8
          3    > > FE_FETCH_R                                       ~6      $5, !2, ->8
          4    >   ASSIGN                                                   !3, ~6
    6     5        ADD                                              ~8      !1, !2
          6        ASSIGN                                                   !1, ~8
    5     7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $5
    8     9      > RETURN                                                   !1
    9    10*     > RETURN                                                   null

End of function penjumlahan

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.1 ms | 1398 KiB | 14 Q