title: making PHP join/concat (.) like JavaScript
body: <p>I've stuck on a seems-to-be simple command join, but can't work it out.</p>
  
  <p>I have a <code>between()</code> function which does the following:</p>
  
  <pre><code>
  /**
   * Checks if passed int is between $left and $right
   * @param int $left lowest value
   * @param int $right highest value
   * @param int $value actual value
   * @return bool is $value between $left and $right
   */
  function between($left, $right, $value)
  {
      $value = intval($value);
      return ( $value >= $left && $value &lt;= $right );
  }
  </code></pre>
  
  <p>and the usage is pretty simple:
  <code><pre>
  $int = 9;</p>
  
  <p>var_dump( between( 6, 14, $int ) );//bool(true)
  </pre></code></p>
  
  <p>Now what I want to achieve is:</p>
  
  <pre><code>
  $int = 9;
  
  var_dump( $int.between( 6, 14 ) );//bool(true)
  </code></pre>
  
  <p>it would make more sense and would be easier to understand.</p>
  
  <p>Any ideas how do I achieve this?</p>
  
  <p>If <code>$int</code> would be an object which extends comparisonFunctions I could do <code>$int-&gt;between();</code> but maybe there is a way to catch what does . join?</p>
  
  <p>Thanks in advance</p>