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) { $func = function ($x, $a) { return $x < $a; }; $max = max(array_filter($arr2, $func)); echo $max; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/R2m4d
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $a, !3 = $func, !4 = $max
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2      > FE_RESET_R                                       $7      !0, ->16
          3    > > FE_FETCH_R                                               $7, !2, ->16
    7     4    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FR2m4d%3A7%240'
          5        ASSIGN                                                   !3, ~8
    8     6        INIT_FCALL                                               'max'
          7        INIT_FCALL                                               'array_filter'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $10     
         11        SEND_VAR                                                 $10
         12        DO_ICALL                                         $11     
         13        ASSIGN                                                   !4, $11
   10    14        ECHO                                                     !4
    6    15      > JMP                                                      ->3
         16    >   FE_FREE                                                  $7
   11    17      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FR2m4d%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.92 ms | 1396 KiB | 17 Q