3v4l.org

run code in 300+ PHP versions simultaneously
<?php $food = array('fruits' => array('item1'=>'orange', 'item2'=>'banana', 'item3'=>'apple'), 'veggie' => array('item1'=>'carrot', 'item2'=>'collard', 'item3'=>'pea')); print_r($food); foreach($food as $item) { echo $item["item1"]."<br >"; } if(in_array('orange', $food, true)){ echo 'in array'; } else { echo 'not in array'; } $test_array=null; echo count($test_array)."count of food "; echo strlen("");
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/RJJOr
function name:  (null)
number of ops:  26
compiled vars:  !0 = $food, !1 = $item, !2 = $test_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    7     4      > FE_RESET_R                                       $5      !0, ->10
          5    > > FE_FETCH_R                                               $5, !1, ->10
    8     6    >   FETCH_DIM_R                                      ~6      !1, 'item1'
          7        CONCAT                                           ~7      ~6, '%3Cbr+%3E'
          8        ECHO                                                     ~7
    7     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $5
   10    11        INIT_FCALL                                               'in_array'
         12        SEND_VAL                                                 'orange'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $8      
         16      > JMPZ                                                     $8, ->19
   11    17    >   ECHO                                                     'in+array'
         18      > JMP                                                      ->20
   13    19    >   ECHO                                                     'not+in+array'
   15    20    >   ASSIGN                                                   !2, null
   16    21        COUNT                                            ~10     !2
         22        CONCAT                                           ~11     ~10, 'count+of+food+'
         23        ECHO                                                     ~11
   17    24        ECHO                                                     0
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.98 ms | 1396 KiB | 17 Q