3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tries = array("foo", "bar", "why?"); $answers = array("When", "Why?", "Foo"); $count = 0; foreach ($answers as $key => $value) { if (in_array(strtolower($value),$tries)) $count++; } echo $count;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/UpRDU
function name:  (null)
number of ops:  19
compiled vars:  !0 = $tries, !1 = $answers, !2 = $count, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, 0
    7     3      > FE_RESET_R                                       $8      !1, ->16
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->16
          5    >   ASSIGN                                                   !4, ~9
    8     6        INIT_FCALL                                               'in_array'
          7        INIT_FCALL                                               'strtolower'
          8        SEND_VAR                                                 !3
          9        DO_ICALL                                         $11     
         10        SEND_VAR                                                 $11
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $12     
         13      > JMPZ                                                     $12, ->15
    9    14    >   PRE_INC                                                  !2
    7    15    > > JMP                                                      ->4
         16    >   FE_FREE                                                  $8
   11    17        ECHO                                                     !2
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.27 ms | 1399 KiB | 17 Q