3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.37 ms | 1396 KiB | 19 Q