3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array("blue", "red", "green", "blue", "blue"); echo count(array_keys($array, "blue")); for ($i = 0; $i < count(array_keys($array, "blue")); ++$i) { print $array[$i]; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 9
Branch analysis from position: 19
Branch analysis from position: 9
filename:       /in/QCIQc
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'blue'
          4        DO_ICALL                                         $3      
          5        COUNT                                            ~4      $3
          6        ECHO                                                     ~4
    4     7        ASSIGN                                                   !1, 0
          8      > JMP                                                      ->12
    5     9    >   FETCH_DIM_R                                      ~6      !0, !1
         10        ECHO                                                     ~6
    4    11        PRE_INC                                                  !1
         12    >   INIT_FCALL                                               'array_keys'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 'blue'
         15        DO_ICALL                                         $8      
         16        COUNT                                            ~9      $8
         17        IS_SMALLER                                               !1, ~9
         18      > JMPNZ                                                    ~10, ->9
    7    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.98 ms | 1395 KiB | 15 Q