3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 元データを用意する $a = array(); $a[2]=10; $a[10]=2; $a[3]=30; $a[22]=20; $a[9]=4; $a[53]=29; //確認 echo $a[2]; //キーを保持してソート asort($a); //確認 echo $a[2]; //最初から 3 個を $b[] に代入 $i = 0; $b = array(); foreach ($a as $k=>$d){ $b[] = $k; if (3 <= ++$i){ break;} } //確認 echo $b[0]; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 32
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 32
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 32
Branch analysis from position: 32
filename:       /in/H1cOd
function name:  (null)
number of ops:  36
compiled vars:  !0 = $a, !1 = $i, !2 = $b, !3 = $d, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0, 2
          2        OP_DATA                                                  10
    5     3        ASSIGN_DIM                                               !0, 10
          4        OP_DATA                                                  2
    6     5        ASSIGN_DIM                                               !0, 3
          6        OP_DATA                                                  30
    7     7        ASSIGN_DIM                                               !0, 22
          8        OP_DATA                                                  20
    8     9        ASSIGN_DIM                                               !0, 9
         10        OP_DATA                                                  4
    9    11        ASSIGN_DIM                                               !0, 53
         12        OP_DATA                                                  29
   11    13        FETCH_DIM_R                                      ~12     !0, 2
         14        ECHO                                                     ~12
   13    15        INIT_FCALL                                               'asort'
         16        SEND_REF                                                 !0
         17        DO_ICALL                                                 
   15    18        FETCH_DIM_R                                      ~14     !0, 2
         19        ECHO                                                     ~14
   17    20        ASSIGN                                                   !1, 0
   18    21        ASSIGN                                                   !2, <array>
   19    22      > FE_RESET_R                                       $17     !0, ->32
         23    > > FE_FETCH_R                                       ~18     $17, !3, ->32
         24    >   ASSIGN                                                   !4, ~18
   20    25        ASSIGN_DIM                                               !2
         26        OP_DATA                                                  !4
   21    27        PRE_INC                                          ~21     !1
         28        IS_SMALLER_OR_EQUAL                                      3, ~21
         29      > JMPZ                                                     ~22, ->31
         30    > > JMP                                                      ->32
   19    31    > > JMP                                                      ->23
         32    >   FE_FREE                                                  $17
   24    33        FETCH_DIM_R                                      ~23     !2, 0
         34        ECHO                                                     ~23
   25    35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.73 ms | 1396 KiB | 15 Q