3v4l.org

run code in 300+ 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 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 28
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 19
Branch analysis from position: 19
filename:       /in/2dJbv
function name:  (null)
number of ops:  29
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, ->19
          3    > > FE_FETCH_R                                               $6, !2, ->19
   39     4    >   INIT_FCALL                                               'in_array'
          5        SEND_VAR                                                 !1
          6        INIT_FCALL                                               'array_column'
          7        FETCH_DIM_R                                      ~7      !2, 'boundingPoly'
          8        FETCH_DIM_R                                      ~8      ~7, 'vertices'
          9        SEND_VAL                                                 ~8
         10        SEND_VAL                                                 'x'
         11        DO_ICALL                                         $9      
         12        SEND_VAR                                                 $9
         13        DO_ICALL                                         $10     
         14      > JMPZ                                                     $10, ->18
   40    15    >   FETCH_DIM_R                                      ~11     !2, 'description'
         16        ASSIGN                                                   !3, ~11
   41    17      > JMP                                                      ->19
   38    18    > > JMP                                                      ->3
         19    >   FE_FREE                                                  $6
   44    20        ISSET_ISEMPTY_CV                                         !3
         21      > JMPZ                                                     ~13, ->28
   45    22    >   ROPE_INIT                                     5  ~15     'found+'
         23        ROPE_ADD                                      1  ~15     ~15, !3
         24        ROPE_ADD                                      2  ~15     ~15, '+with+x+%3D+'
         25        ROPE_ADD                                      3  ~15     ~15, !1
         26        ROPE_END                                      4  ~14     ~15, '%0A'
         27        ECHO                                                     ~14
   46    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.04 ms | 1002 KiB | 15 Q