3v4l.org

run code in 300+ PHP versions simultaneously
<?php Ok ("test", array("1" => 5, "0" => 5)); function Ok($login, $scores) { $outScores = array(); echo "first\n"; print_r($scores); foreach ($scores as $id => $score) { echo "$id => $val \n"; $outScores[] = array("PlayerId" => intval($id), "Score" => intval($score)); } echo "final \n"; print_r($outScores); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BeNrk
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'Ok'
          1        SEND_VAL_EX                                              'test'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
   16     4      > RETURN                                                   1

Function ok:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 22
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 22
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/BeNrk
function name:  Ok
number of ops:  28
compiled vars:  !0 = $login, !1 = $scores, !2 = $outScores, !3 = $score, !4 = $id, !5 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        ASSIGN                                                   !2, <array>
    7     3        ECHO                                                     'first%0A'
    8     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
   10     7      > FE_RESET_R                                       $8      !1, ->22
          8    > > FE_FETCH_R                                       ~9      $8, !3, ->22
          9    >   ASSIGN                                                   !4, ~9
   11    10        ROPE_INIT                                     4  ~12     !4
         11        ROPE_ADD                                      1  ~12     ~12, '+%3D%3E+'
         12        ROPE_ADD                                      2  ~12     ~12, !5
         13        ROPE_END                                      3  ~11     ~12, '+%0A'
         14        ECHO                                                     ~11
   12    15        CAST                                          4  ~15     !4
         16        INIT_ARRAY                                       ~16     ~15, 'PlayerId'
         17        CAST                                          4  ~17     !3
         18        ADD_ARRAY_ELEMENT                                ~16     ~17, 'Score'
         19        ASSIGN_DIM                                               !2
         20        OP_DATA                                                  ~16
   10    21      > JMP                                                      ->8
         22    >   FE_FREE                                                  $8
   14    23        ECHO                                                     'final+%0A'
   15    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                                 
   16    27      > RETURN                                                   null

End of function ok

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.88 ms | 1396 KiB | 15 Q