3v4l.org

run code in 300+ 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                                  '%00%7Bclosure%7D%2Fin%2FI6L1L%3A4%240'
   15     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   17     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FI6L1L%3A4%240:
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}
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'
          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'
         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 function %00%7Bclosure%7D%2Fin%2FI6L1L%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.03 ms | 1405 KiB | 17 Q