3v4l.org

run code in 300+ PHP versions simultaneously
<?php array_walk(array_filter($checkboxes, function($checkbox) use ($shapeCheckboxIds) { /** @var NodeElement $checkbox */ return in_array($this->findClosestElement($checkbox, 'input')->getAttribute('id'), $shapeCheckboxIds); }), function($checkbox) { /** @var NodeElement $checkbox */ $checkbox->getParent()->click(); });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kuCnD
function name:  (null)
number of ops:  12
compiled vars:  !0 = $checkboxes, !1 = $shapeCheckboxIds
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'array_walk'
          1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkuCnD%3A3%240'
          4        BIND_LEXICAL                                             ~2, !1
    6     5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7        SEND_VAR_NO_REF                               0          $3
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkuCnD%3A6%241'
    9     9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FkuCnD%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kuCnD
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $checkbox, !1 = $shapeCheckboxIds
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    5     2        INIT_FCALL                                               'in_array'
          3        FETCH_THIS                                       $2      
          4        INIT_METHOD_CALL                                         $2, 'findClosestElement'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              'input'
          7        DO_FCALL                                      0  $3      
          8        INIT_METHOD_CALL                                         $3, 'getAttribute'
          9        SEND_VAL_EX                                              'id'
         10        DO_FCALL                                      0  $4      
         11        SEND_VAR                                                 $4
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $5      
         14      > RETURN                                                   $5
    6    15*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkuCnD%3A3%240

Function %00%7Bclosure%7D%2Fin%2FkuCnD%3A6%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kuCnD
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $checkbox
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
    8     1        INIT_METHOD_CALL                                         !0, 'getParent'
          2        DO_FCALL                                      0  $1      
          3        INIT_METHOD_CALL                                         $1, 'click'
          4        DO_FCALL                                      0          
    9     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkuCnD%3A6%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.07 ms | 1404 KiB | 19 Q