3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array ( 91 => array ( 'description' => 'Charged', 'boundingPoly' => array ( 'vertices' => array ( 0 => array ( 'x' => 244, 'y' => 438 ), 1 => array ( 'x' => 287, 'y' => 438 ), 2 => array ( 'x' => 287, 'y' => 452 ), 3 => array ( 'x' => 244, 'y' => 452 ), ')))' ) ) ) ); $x = 244; foreach ($array as $box) { if (in_array($x, array_column($box['boundingPoly']['vertices'], 'x'))) { $descr = $box['description']; break; } } if (isset($descr)) { echo "found $descr with x = $x\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
Branch analysis from position: 16
filename:       /in/2dJbv
function name:  (null)
number of ops:  26
compiled vars:  !0 = $array, !1 = $x, !2 = $box, !3 = $descr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   37     1        ASSIGN                                                       !1, 244
   38     2      > FE_RESET_R                                           $6      !0, ->16
          3    > > FE_FETCH_R                                                   $6, !2, ->16
   39     4    >   INIT_FCALL                                                   'array_column'
          5        FETCH_DIM_R                                          ~7      !2, 'boundingPoly'
          6        FETCH_DIM_R                                          ~8      ~7, 'vertices'
          7        SEND_VAL                                                     ~8
          8        SEND_VAL                                                     'x'
          9        DO_ICALL                                             $9      
         10        FRAMELESS_ICALL_2                in_array            ~10     !1, $9
         11      > JMPZ                                                         ~10, ->15
   40    12    >   FETCH_DIM_R                                          ~11     !2, 'description'
         13        ASSIGN                                                       !3, ~11
   41    14      > JMP                                                          ->16
   38    15    > > JMP                                                          ->3
         16    >   FE_FREE                                                      $6
   44    17        ISSET_ISEMPTY_CV                                             !3
         18      > JMPZ                                                         ~13, ->25
   45    19    >   ROPE_INIT                                         5  ~15     'found+'
         20        ROPE_ADD                                          1  ~15     ~15, !3
         21        ROPE_ADD                                          2  ~15     ~15, '+with+x+%3D+'
         22        ROPE_ADD                                          3  ~15     ~15, !1
         23        ROPE_END                                          4  ~14     ~15, '%0A'
         24        ECHO                                                         ~14
   46    25    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.37 ms | 2092 KiB | 14 Q