3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('array_all')) { // polyfill for PHP versions below 8.4 function array_all(array $array, callable $callback): bool { foreach ($array as $key => $value) { if (!$callback($value, $key)) { return false; } } return true; } } $array = [1, '2', -644, '45.55', 3.14, 1e4]; var_export( array_all($array, fn($v) => is_numeric($v)) );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/PHfLi
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'array_all'
          2        DO_ICALL                                         $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->6
    5     5    >   DECLARE_FUNCTION                                         'array_all'
   16     6    >   ASSIGN                                                   !0, <array>
   17     7        INIT_FCALL                                               'var_export'
   18     8        INIT_FCALL_BY_NAME                                       'array_all'
          9        SEND_VAR_EX                                              !0
         10        DECLARE_LAMBDA_FUNCTION                          ~4      [1]
         11        SEND_VAL_EX                                              ~4
         12        DO_FCALL                                      0  $5      
         13        SEND_VAR                                                 $5
   17    14        DO_ICALL                                                 
   19    15      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/PHfLi
function name:  array_all
number of ops:  18
compiled vars:  !0 = $array, !1 = $callback, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2      > FE_RESET_R                                       $4      !0, ->14
          3    > > FE_FETCH_R                                       ~5      $4, !2, ->14
          4    >   ASSIGN                                                   !3, ~5
    7     5        INIT_DYNAMIC_CALL                                        !1
          6        SEND_VAR_EX                                              !2
          7        SEND_VAR_EX                                              !3
          8        DO_FCALL                                      0  $7      
          9        BOOL_NOT                                         ~8      $7
         10      > JMPZ                                                     ~8, ->13
    8    11    >   FE_FREE                                                  $4
         12      > RETURN                                                   <false>
    6    13    > > JMP                                                      ->3
         14    >   FE_FREE                                                  $4
   12    15      > RETURN                                                   <true>
   13    16*       VERIFY_RETURN_TYPE                                       
         17*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PHfLi
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'is_numeric'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
          5*     > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.55 ms | 1005 KiB | 16 Q