fork(35) download
  1.  
  2. <?php
  3.  
  4. $a = array(
  5. 'a' => NULL,
  6. 'b' => 1,
  7. 'c' => 1
  8. );
  9.  
  10. $b = array(
  11. 'a' => 1,
  12. 'b' => NULL,
  13. 'c' => 1
  14. );
  15.  
  16. $b = array_filter($b);
  17. $a = array_filter($a);
  18. $c = array_merge($a, $b);
  19.  
  20.  
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
 array(3) {
  ["b"]=>
  int(1)
  ["c"]=>
  int(1)
  ["a"]=>
  int(1)
}