3v4l.org

run code in 300+ PHP versions simultaneously
<?php $listing = new stdClass; $listing->name = 'Test Location'; $results = [ 0 => [ 'address' => '123 Testing', 'name' => 'Test Location' ] ]; foreach($results AS $key => $result) { if( strtolower($listing->name) === strtolower($result['name']) ) { echo 'key: '. $key; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 22
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 22
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 21
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/hrCBd
function name:  (null)
number of ops:  24
compiled vars:  !0 = $listing, !1 = $results, !2 = $result, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        ASSIGN_OBJ                                               !0, 'name'
          4        OP_DATA                                                  'Test+Location'
    6     5        ASSIGN                                                   !1, <array>
    8     6      > FE_RESET_R                                       $9      !1, ->22
          7    > > FE_FETCH_R                                       ~10     $9, !2, ->22
          8    >   ASSIGN                                                   !3, ~10
   10     9        INIT_FCALL                                               'strtolower'
         10        FETCH_OBJ_R                                      ~12     !0, 'name'
         11        SEND_VAL                                                 ~12
         12        DO_ICALL                                         $13     
         13        INIT_FCALL                                               'strtolower'
         14        FETCH_DIM_R                                      ~14     !2, 'name'
         15        SEND_VAL                                                 ~14
         16        DO_ICALL                                         $15     
         17        IS_IDENTICAL                                             $13, $15
         18      > JMPZ                                                     ~16, ->21
   12    19    >   CONCAT                                           ~17     'key%3A+', !3
         20        ECHO                                                     ~17
    8    21    > > JMP                                                      ->7
         22    >   FE_FREE                                                  $9
   15    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.32 ms | 1387 KiB | 15 Q