3v4l.org

run code in 300+ PHP versions simultaneously
<?php function all_valid() { return array_reduce(func_get_args(), function($valid, $ampe) { return $ampe && $valid; }, true); } var_dump(all_valid(true, true, false, true, true, false));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HIHDO
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'all_valid'
          2        SEND_VAL                                                 <true>
          3        SEND_VAL                                                 <true>
          4        SEND_VAL                                                 <false>
          5        SEND_VAL                                                 <true>
          6        SEND_VAL                                                 <true>
          7        SEND_VAL                                                 <false>
          8        DO_FCALL                                      0  $0      
          9        SEND_VAR                                                 $0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function all_valid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HIHDO
function name:  all_valid
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'array_reduce'
          1        FUNC_GET_ARGS                                    ~0      
          2        SEND_VAL                                                 ~0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHIHDO%3A5%240'
    7     4        SEND_VAL                                                 ~1
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
    8     8*     > RETURN                                                   null

End of function all_valid

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

End of function %00%7Bclosure%7D%2Fin%2FHIHDO%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.97 ms | 1399 KiB | 18 Q