3v4l.org

run code in 300+ PHP versions simultaneously
<?php $try = 2; if ($try == 1) { $tries = array("when what", "why?"); $answers = array("Why", "Why?"); } else if ($try == 2) { $tries = array("why?", "why"); $answers = array("Why", "Why?"); } else if ($try == 3) { $tries = array("why?"); $answers = array("Why", "Why?"); } print_r($tries); print_r($answers); // $count = 0; foreach ($answers as $key => $value) { if (in_array(strtolower($value),$tries)) { $count++; } } echo "Count is: ".$count; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 35
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 35
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 34
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 34
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 35
Branch analysis from position: 23
Branch analysis from position: 35
Branch analysis from position: 15
filename:       /in/NI5mc
function name:  (null)
number of ops:  39
compiled vars:  !0 = $try, !1 = $tries, !2 = $answers, !3 = $count, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2
    5     1        IS_EQUAL                                                 !0, 1
          2      > JMPZ                                                     ~7, ->6
    7     3    >   ASSIGN                                                   !1, <array>
    8     4        ASSIGN                                                   !2, <array>
          5      > JMP                                                      ->15
   10     6    >   IS_EQUAL                                                 !0, 2
          7      > JMPZ                                                     ~10, ->11
   12     8    >   ASSIGN                                                   !1, <array>
   13     9        ASSIGN                                                   !2, <array>
         10      > JMP                                                      ->15
   15    11    >   IS_EQUAL                                                 !0, 3
         12      > JMPZ                                                     ~13, ->15
   17    13    >   ASSIGN                                                   !1, <array>
   18    14        ASSIGN                                                   !2, <array>
   21    15    >   INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   22    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
   24    21        ASSIGN                                                   !3, 0
   25    22      > FE_RESET_R                                       $19     !2, ->35
         23    > > FE_FETCH_R                                       ~20     $19, !4, ->35
         24    >   ASSIGN                                                   !5, ~20
   26    25        INIT_FCALL                                               'in_array'
         26        INIT_FCALL                                               'strtolower'
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $22     
         29        SEND_VAR                                                 $22
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                         $23     
         32      > JMPZ                                                     $23, ->34
   28    33    >   PRE_INC                                                  !3
   25    34    > > JMP                                                      ->23
         35    >   FE_FREE                                                  $19
   32    36        CONCAT                                           ~25     'Count+is%3A+', !3
         37        ECHO                                                     ~25
   35    38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.07 ms | 1400 KiB | 19 Q