3v4l.org

run code in 500+ PHP versions simultaneously
<?php $summary = [ "person1" => [ 'question1' => '3', 'question2' => '5' ], "person2" => [ 'question1' => '2', 'question2' => '3' ], "person3" => [ 'question1' => '1', 'question2' => '2' ] ]; var_export( array_map(fn($questions) => ['questions' => array_sum($questions)], $summary) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hJlPk
function name:  (null)
number of ops:  10
compiled vars:  !0 = $summary
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   18     1        INIT_FCALL                                                   'var_export'
   19     2        INIT_FCALL                                                   'array_map'
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          4        SEND_VAL                                                     ~2
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $3      
          7        SEND_VAR                                                     $3
   18     8        DO_ICALL                                                     
   20     9      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hJlPk
function name:  {closure:/in/hJlPk:19}
number of ops:  7
compiled vars:  !0 = $questions
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   RECV                                                 !0      
          1        INIT_FCALL                                                   'array_sum'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $1      
          4        INIT_ARRAY                                           ~2      $1, 'questions'
          5      > RETURN                                                       ~2
          6*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
187.79 ms | 1914 KiB | 16 Q