3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sampleData = range(80, 110); $result = array_fill_keys(['80s', '90s', '100s'], 0); foreach ($sampleData as $value) { ++$result[(10 * ((int)($value / 10) <=> 9) + 90) . 's']; } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/OMmkb
function name:  (null)
number of ops:  26
compiled vars:  !0 = $sampleData, !1 = $result, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 80
          2        SEND_VAL                                                 110
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    4     5        INIT_FCALL                                               'array_fill_keys'
          6        SEND_VAL                                                 <array>
          7        SEND_VAL                                                 0
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    5    10      > FE_RESET_R                                       $7      !0, ->21
         11    > > FE_FETCH_R                                               $7, !2, ->21
    6    12    >   DIV                                              ~8      !2, 10
         13        CAST                                          4  ~9      ~8
         14        SPACESHIP                                        ~10     ~9, 9
         15        MUL                                              ~11     ~10, 10
         16        ADD                                              ~12     ~11, 90
         17        CONCAT                                           ~13     ~12, 's'
         18        FETCH_DIM_RW                                     $14     !1, ~13
         19        PRE_INC                                                  $14
    5    20      > JMP                                                      ->11
         21    >   FE_FREE                                                  $7
    9    22        INIT_FCALL                                               'var_export'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.82 ms | 1012 KiB | 16 Q