3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fortuneArray = [ '1' => '80 | 96 | 1000', '2' => '3648|4000|100' ]; $valueToBeCompared = ['88']; $result = null; foreach ($fortuneArray as $dataset) { [$min, $max, $fortune] = explode('|', $dataset); if ((int)$min < $valueToBeCompared[0] && $valueToBeCompared[0] < (int)$max) { $result = (int)$fortune; break; } } echo $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 29
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 29
Branch analysis from position: 5
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 28
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 24
Branch analysis from position: 29
Branch analysis from position: 29
filename:       /in/UOd3W
function name:  (null)
number of ops:  32
compiled vars:  !0 = $fortuneArray, !1 = $valueToBeCompared, !2 = $result, !3 = $dataset, !4 = $min, !5 = $max, !6 = $fortune
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, <array>
    9     2        ASSIGN                                                   !2, null
   10     3      > FE_RESET_R                                       $10     !0, ->29
          4    > > FE_FETCH_R                                               $10, !3, ->29
   11     5    >   INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '%7C'
          7        SEND_VAR                                                 !3
          8        DO_ICALL                                         $11     
          9        FETCH_LIST_R                                     $12     $11, 0
         10        ASSIGN                                                   !4, $12
         11        FETCH_LIST_R                                     $14     $11, 1
         12        ASSIGN                                                   !5, $14
         13        FETCH_LIST_R                                     $16     $11, 2
         14        ASSIGN                                                   !6, $16
         15        FREE                                                     $11
   12    16        CAST                                          4  ~18     !4
         17        FETCH_DIM_R                                      ~19     !1, 0
         18        IS_SMALLER                                       ~20     ~18, ~19
         19      > JMPZ_EX                                          ~20     ~20, ->24
         20    >   FETCH_DIM_R                                      ~21     !1, 0
         21        CAST                                          4  ~22     !5
         22        IS_SMALLER                                       ~23     ~21, ~22
         23        BOOL                                             ~20     ~23
         24    > > JMPZ                                                     ~20, ->28
   13    25    >   CAST                                          4  ~24     !6
         26        ASSIGN                                                   !2, ~24
   14    27      > JMP                                                      ->29
   10    28    > > JMP                                                      ->4
         29    >   FE_FREE                                                  $10
   17    30        ECHO                                                     !2
   18    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.22 ms | 1003 KiB | 14 Q