3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lookup = [ 1 => 'low', 2 => 'fair', 3 => 'good', 4 => 'excellent' ]; for ($i = -1; $i <= 101; ++$i) { echo "\n$i : " , $lookup[ceil($i / 25)] ?? $lookup[1]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
Branch analysis from position: 3
filename:       /in/bQLQG
function name:  (null)
number of ops:  20
compiled vars:  !0 = $lookup, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, -1
          2      > JMP                                                      ->17
   10     3    >   ROPE_INIT                                     3  ~5      '%0A'
          4        ROPE_ADD                                      1  ~5      ~5, !1
          5        ROPE_END                                      2  ~4      ~5, '+%3A+'
          6        ECHO                                                     ~4
          7        INIT_FCALL                                               'ceil'
          8        DIV                                              ~7      !1, 25
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                         $8      
         11        FETCH_DIM_IS                                     ~9      !0, $8
         12        COALESCE                                         ~10     ~9
         13        FETCH_DIM_R                                      ~11     !0, 1
         14        QM_ASSIGN                                        ~10     ~11
         15        ECHO                                                     ~10
    9    16        PRE_INC                                                  !1
         17    >   IS_SMALLER_OR_EQUAL                                      !1, 101
         18      > JMPNZ                                                    ~13, ->3
   11    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.87 ms | 1395 KiB | 15 Q