3v4l.org

run code in 300+ PHP versions simultaneously
<?php $checkboxes = [ [ 'tnid' => 45, 'Name' => 'Financial Tips', 'Email' => [], 'Href' => 'http://amt-ars-d.sevenverbs.com/api/v1/emailtemplategroups/5', ], [ 'tnid' => 42, 'Name' => 'Products', 'Email' => [], 'Href' => 'http://amt-ars-d.sevenverbs.com/api/v1/emailtemplategroups/2', ], [ 'tnid' => 44, 'Name' => 'Health Tips', 'Email' => [], 'Href' => 'http://amt-ars-d.sevenverbs.com/api/v1/emailtemplategroups/4', ], [ 'tnid' => 43, 'Name' => 'Personal Events', 'Email' => [], 'Href' => 'http://amt-ars-d.sevenverbs.com/api/v1/emailtemplategroups/3', ], [ 'tnid' => 41, 'Name' => 'Calendar', 'Email' => [], 'Href' => 'http://amt-ars-d.sevenverbs.com/api/v1/emailtemplategroups/1', ], ]; $selected = [ [ 'emarketid' => 77, 'agentid' => 81, 'customerid' => 16901, 'Seltemgr' => 'Calendar', 'seltemname' => '', ], [ 'emarketid' => 78, 'agentid' => 81, 'customerid' => 16901, 'Seltemgr' => 'Financial Tips', 'seltemname' => '', ], [ 'emarketid' => 79, 'agentid' => 81, 'customerid' => 16901, 'Seltemgr' => 'Merry Christmas', 'seltemname' => '', ], [ 'emarketid' => 80, 'agentid' => 81, 'customerid' => 16901, 'Seltemgr' => 'Drip financial tip 3', 'seltemname' => '', ], ]; var_export( array_map( fn($row) => $row + ['found' => array_any($selected, fn($selRow) => $row['Name'] == $selRow['Seltemgr'])], $checkboxes ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SpqvBe
function name:  (null)
number of ops:  13
compiled vars:  !0 = $checkboxes, !1 = $selected, !2 = $selRow
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   36     1        ASSIGN                                                   !1, <array>
   67     2        INIT_FCALL                                               'var_export'
   68     3        INIT_FCALL                                               'array_map'
   69     4        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          5        BIND_LEXICAL                                             ~5, !1
          6        BIND_LEXICAL                                             ~5, !2
   70     7        SEND_VAL                                                 ~5
   71     8        SEND_VAR                                                 !0
   68     9        DO_ICALL                                         $6      
   71    10        SEND_VAR                                                 $6
   67    11        DO_ICALL                                                 
   73    12      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SpqvBe
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $row, !1 = $selected, !2 = $selRow
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   69     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
   70     3        INIT_FCALL_BY_NAME                                       'array_any'
          4        SEND_VAR_EX                                              !1
          5        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          6        BIND_LEXICAL                                             ~3, !0
          7        SEND_VAL_EX                                              ~3
          8        DO_FCALL                                      0  $4      
          9        INIT_ARRAY                                       ~5      $4, 'found'
         10        ADD                                              ~6      !0, ~5
         11      > RETURN                                                   ~6
         12*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SpqvBe
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $selRow, !1 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        FETCH_DIM_R                                      ~2      !1, 'Name'
          3        FETCH_DIM_R                                      ~3      !0, 'Seltemgr'
          4        IS_EQUAL                                         ~4      ~2, ~3
          5      > RETURN                                                   ~4
          6*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.05 ms | 1000 KiB | 15 Q