3v4l.org

run code in 300+ PHP versions simultaneously
<?php $jobTiers = array("tier_1" => array("jobs_to_inc" => 10, "jobs_to_dec" => 8), "tier_2" => array("jobs_to_inc" => 20, "jobs_to_dec" => 16)); $jobCount = 10; $test = array_walk_recursive($jobTiers, function($arr) use ($jobCount) { return $jobCount >= $arr['jobs_to_dec'] && $jobCount <= $arr['jobs_to_inc']; }); var_dump($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BRSLM
function name:  (null)
number of ops:  13
compiled vars:  !0 = $jobTiers, !1 = $jobCount, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 10
    6     2        INIT_FCALL                                               'array_walk_recursive'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBRSLM%3A6%240'
          5        BIND_LEXICAL                                             ~5, !1
    8     6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
    6     8        ASSIGN                                                   !2, $6
   10     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBRSLM%3A6%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/BRSLM
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $arr, !1 = $jobCount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    7     2        FETCH_DIM_R                                      ~2      !0, 'jobs_to_dec'
          3        IS_SMALLER_OR_EQUAL                              ~3      ~2, !1
          4      > JMPZ_EX                                          ~3      ~3, ->8
          5    >   FETCH_DIM_R                                      ~4      !0, 'jobs_to_inc'
          6        IS_SMALLER_OR_EQUAL                              ~5      !1, ~4
          7        BOOL                                             ~3      ~5
          8    > > RETURN                                                   ~3
    8     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBRSLM%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.91 ms | 1395 KiB | 17 Q