3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hire = array( 'hiring' => array( (int) 1 => '10', (int) 2 => '5', (int) 3 => '8', (int) 4 => '15' ) ); $a=[]; foreach($hire['hiring'] as $key=>$value) { $a[$key] = (int)$value; } print_r(a);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/d3Vi5
function name:  (null)
number of ops:  25
compiled vars:  !0 = $hire, !1 = $a, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   CAST                                          4  ~4      1
          1        INIT_ARRAY                                       ~5      '10', ~4
    5     2        CAST                                          4  ~6      2
          3        ADD_ARRAY_ELEMENT                                ~5      '5', ~6
    6     4        CAST                                          4  ~7      3
          5        ADD_ARRAY_ELEMENT                                ~5      '8', ~7
    7     6        CAST                                          4  ~8      4
          7        ADD_ARRAY_ELEMENT                                ~5      '15', ~8
          8        INIT_ARRAY                                       ~9      ~5, 'hiring'
    2     9        ASSIGN                                                   !0, ~9
   10    10        ASSIGN                                                   !1, <array>
   11    11        FETCH_DIM_R                                      ~12     !0, 'hiring'
         12      > FE_RESET_R                                       $13     ~12, ->19
         13    > > FE_FETCH_R                                       ~14     $13, !2, ->19
         14    >   ASSIGN                                                   !3, ~14
   12    15        CAST                                          4  ~17     !2
         16        ASSIGN_DIM                                               !1, !3
         17        OP_DATA                                                  ~17
   11    18      > JMP                                                      ->13
         19    >   FE_FREE                                                  $13
   14    20        INIT_FCALL                                               'print_r'
         21        FETCH_CONSTANT                                   ~18     'a'
         22        SEND_VAL                                                 ~18
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.22 ms | 1395 KiB | 15 Q