3v4l.org

run code in 500+ PHP versions simultaneously
<?php $value = 'b'; $checkbox_values = ['a' => 'Aaa', 'b' => 'Bbb', 'c' => 'Ccc']; array_walk($checkbox_values, function(&$option_value, $key) use($value) { var_dump($value); $option_value = (int)(strval($key) === $value); }); print_r($checkbox_values);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KiLHp
function name:  (null)
number of ops:  12
compiled vars:  !0 = $value, !1 = $checkbox_values
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'b'
    4     1        ASSIGN                                                       !1, <array>
    6     2        INIT_FCALL                                                   'array_walk'
          3        SEND_REF                                                     !1
          4        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          5        BIND_LEXICAL                                                 ~4, !0
    9     6        SEND_VAL                                                     ~4
    6     7        DO_ICALL                                                     
   11     8        INIT_FCALL                                                   'print_r'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                                     
         11      > 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/KiLHp
function name:  {closure:/in/KiLHp:6}
number of ops:  11
compiled vars:  !0 = $option_value, !1 = $key, !2 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
    7     3        INIT_FCALL                                                   'var_dump'
          4        SEND_VAR                                                     !2
          5        DO_ICALL                                                     
    8     6        CAST                                              6  ~4      !1
          7        IS_IDENTICAL                                         ~5      !2, ~4
          8        CAST                                              4  ~6      ~5
          9        ASSIGN                                                       !0, ~6
    9    10      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
122.95 ms | 480 KiB | 10 Q