3v4l.org

run code in 500+ PHP versions simultaneously
<?php $mark = array(90,85); array_walk_recursive($mark, function (&$k) { if ($k >= 90) { echo "$k: 4.0\n"; $k = '4.0'; } else if ($k >= 80 && $k<90) { echo "$k: 3.6\n"; $k = '3.6'; } else if ($k < 80) { echo "$k: 2.8\n"; $k = '2.8'; } }); print_r($mark);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I6L1L
function name:  (null)
number of ops:  10
compiled vars:  !0 = $mark
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    4     1        INIT_FCALL                                                   'array_walk_recursive'
          2        SEND_REF                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   15     4        SEND_VAL                                                     ~2
    4     5        DO_ICALL                                                     
   17     6        INIT_FCALL                                                   'print_r'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                                     
          9      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 12
filename:       /in/I6L1L
function name:  {closure:/in/I6L1L:4}
number of ops:  25
compiled vars:  !0 = $k
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
    5     1        IS_SMALLER_OR_EQUAL                                          90, !0
          2      > JMPZ                                                         ~1, ->8
    6     3    >   NOP                                                          
          4        FAST_CONCAT                                          ~2      !0, '%3A+4.0%0A'
          5        ECHO                                                         ~2
    7     6        ASSIGN                                                       !0, '4.0'
    5     7      > JMP                                                          ->24
    8     8    >   IS_SMALLER_OR_EQUAL                                  ~4      80, !0
          9      > JMPZ_EX                                              ~4      ~4, ->12
         10    >   IS_SMALLER                                           ~5      !0, 90
         11        BOOL                                                 ~4      ~5
         12    > > JMPZ                                                         ~4, ->18
    9    13    >   NOP                                                          
         14        FAST_CONCAT                                          ~6      !0, '%3A+3.6%0A'
         15        ECHO                                                         ~6
   10    16        ASSIGN                                                       !0, '3.6'
    8    17      > JMP                                                          ->24
   11    18    >   IS_SMALLER                                                   !0, 80
         19      > JMPZ                                                         ~8, ->24
   12    20    >   NOP                                                          
         21        FAST_CONCAT                                          ~9      !0, '%3A+2.8%0A'
         22        ECHO                                                         ~9
   13    23        ASSIGN                                                       !0, '2.8'
   15    24    > > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.27 ms | 2247 KiB | 15 Q