title: Implode values from array with NULL or empty values cause unexpected output
body: <p>I am trying to get the following output:</p>
  
  <pre><code>string1, string2, string3
  </code></pre>
  
  <p>Those values comes from <code>$var1</code>, <code>$var2</code> and <code>$var3</code> but they can be <code>NULL</code> at some point and here is where my problem is.</p>
  
  <p>So far this is what I have:</p>
  
  <pre><code>$arr = array(
      $var1 !== null ? $var1 : '',
      $var2 !== null ? $var2 : '',
      $var3 !== null ? $var3 : '',
  );
  
  echo $arr !== '' ? implode(', ', $arr) : '-';
  </code></pre>
  
  <p>This are the test I've run:</p>
  
  <pre><code>input: array('string1', 'string2', 'string3')
  output: string1, string2, string3
  
  input: array('string1', 'string2')
  output: string1, string2
  
  input: array('', '', '')
  output: , ,
  
  input: array(null, null, null)
  output: , ,
  </code></pre>
  
  <p>As you may notice if values are coming everything work as I want, if values are coming <code>NULL</code> then I am getting <code>, ,</code> when I what I want is just a <code>-</code>.</p>
  
  <p>I have tried to find whether the array contains empty values or not using this code:</p>
  
  <pre><code>$cnt = count($arr) !== count(array_filter($arr, "strlen"));
  echo $cnt;
  </code></pre>
  
  <p>Then I've run the following test:</p>
  
  <pre><code>input: array('string1', 'string2', 'string3')
  output: 3
  
  input: array('string1', 'string2')
  output: 2
  
  input: array('', '', '')
  output: 1
  
  input: array(null, null, null)
  output: 1
  </code></pre>
  
  <p>What I am missing or doing wrong here? How I can achieve this?</p>