3v4l.org

run code in 500+ PHP versions simultaneously
<?php $sandbox = [ 'first' => ['#finished' => 1], 'second' => ['#finished' => .5], 'third' => ['#finished' => .1], ]; $overall_finished = array_sum(array_column($sandbox, '#finished')); echo $overall_finished / count($sandbox);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4l1hG
function name:  (null)
number of ops:  13
compiled vars:  !0 = $sandbox, !1 = $overall_finished
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    9     1        INIT_FCALL                                                   'array_sum'
          2        INIT_FCALL                                                   'array_column'
          3        SEND_VAR                                                     !0
          4        SEND_VAL                                                     '%23finished'
          5        DO_ICALL                                             $3      
          6        SEND_VAR                                                     $3
          7        DO_ICALL                                             $4      
          8        ASSIGN                                                       !1, $4
   10     9        COUNT                                                ~6      !0
         10        DIV                                                  ~7      !1, ~6
         11        ECHO                                                         ~7
         12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.66 ms | 479 KiB | 9 Q