3v4l.org

run code in 300+ PHP versions simultaneously
<?php function atLeastTwoNotNull() { var_dump(count(array_filter(func_get_args(), 'is_null'))); return (count(array_filter(func_get_args(), function($arg){ return !is_null($arg); } )) >= 2); } $a = null; $b = true; $c = false; $d = null; $e = null; var_dump(atLeastTwoNotNull($a, $b, $c, $d, $e));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cAiki
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d, !4 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, null
    8     1        ASSIGN                                                   !1, <true>
    9     2        ASSIGN                                                   !2, <false>
   10     3        ASSIGN                                                   !3, null
   11     4        ASSIGN                                                   !4, null
   13     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'atleasttwonotnull'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !2
         10        SEND_VAR                                                 !3
         11        SEND_VAR                                                 !4
         12        DO_FCALL                                      0  $10     
         13        SEND_VAR                                                 $10
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function atleasttwonotnull:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cAiki
function name:  atLeastTwoNotNull
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'array_filter'
          2        FUNC_GET_ARGS                                    ~0      
          3        SEND_VAL                                                 ~0
          4        SEND_VAL                                                 'is_null'
          5        DO_ICALL                                         $1      
          6        COUNT                                            ~2      $1
          7        SEND_VAL                                                 ~2
          8        DO_ICALL                                                 
    4     9        INIT_FCALL                                               'array_filter'
         10        FUNC_GET_ARGS                                    ~4      
         11        SEND_VAL                                                 ~4
         12        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FcAiki%3A4%240'
         13        SEND_VAL                                                 ~5
         14        DO_ICALL                                         $6      
         15        COUNT                                            ~7      $6
         16        IS_SMALLER_OR_EQUAL                              ~8      2, ~7
         17      > RETURN                                                   ~8
    5    18*     > RETURN                                                   null

End of function atleasttwonotnull

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

End of function %00%7Bclosure%7D%2Fin%2FcAiki%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.38 ms | 1394 KiB | 18 Q