3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = array( "text"=>"1,1,1,1,1,1,3,4,4,4,2,2,4,3,5,5,5,5,5,5,5,5,2,4,3,3,2,3,3,3,4,3,3,3,3,3,3,3,3,4,1,4,1,1,4,2,2,2,2,3" ); $data = array_chunk(explode(',', $arr['text']), 10); foreach($data as $datum) { echo array_sum($datum) / count($datum), "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/OuX9n
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arr, !1 = $data, !2 = $datum
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    6     1        INIT_FCALL                                                   'array_chunk'
          2        INIT_FCALL                                                   'explode'
          3        SEND_VAL                                                     '%2C'
          4        FETCH_DIM_R                                          ~4      !0, 'text'
          5        SEND_VAL                                                     ~4
          6        DO_ICALL                                             $5      
          7        SEND_VAR                                                     $5
          8        SEND_VAL                                                     10
          9        DO_ICALL                                             $6      
         10        ASSIGN                                                       !1, $6
    8    11      > FE_RESET_R                                           $8      !1, ->21
         12    > > FE_FETCH_R                                                   $8, !2, ->21
    9    13    >   INIT_FCALL                                                   'array_sum'
         14        SEND_VAR                                                     !2
         15        DO_ICALL                                             $9      
         16        COUNT                                                ~10     !2
         17        DIV                                                  ~11     $9, ~10
         18        ECHO                                                         ~11
         19        ECHO                                                         '%0A'
    8    20      > JMP                                                          ->12
         21    >   FE_FREE                                                      $8
   10    22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
150.92 ms | 1755 KiB | 16 Q