3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = array(5, 3, 9, 11, 6, 15); $arr2 = array(11, 20, 1, 3, 8); foreach($arr1 as $a) { $y = $a; $max = max(array_filter($arr2, function ($x) use ($y) { return $x < $y; })); echo $max; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/J7guh
function name:  (null)
number of ops:  19
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $a, !3 = $y, !4 = $max
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    7     2      > FE_RESET_R                                       $7      !0, ->17
          3    > > FE_FETCH_R                                               $7, !2, ->17
    8     4    >   ASSIGN                                                   !3, !2
    9     5        INIT_FCALL                                               'max'
          6        INIT_FCALL                                               'array_filter'
          7        SEND_VAR                                                 !1
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJ7guh%3A9%240'
          9        BIND_LEXICAL                                             ~9, !3
         10        SEND_VAL                                                 ~9
         11        DO_ICALL                                         $10     
         12        SEND_VAR                                                 $10
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !4, $11
   11    15        ECHO                                                     !4
    7    16      > JMP                                                      ->3
         17    >   FE_FREE                                                  $7
   12    18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FJ7guh%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J7guh
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        IS_SMALLER                                       ~2      !0, !1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FJ7guh%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.73 ms | 1396 KiB | 17 Q