title: How to use bindTo in PHP
body: <p>it is not exactly a question, but I found a following example and I can't understand how does it work, can someone explain it?</p>
  <pre><code>&lt;?php
  class Number {
      private $v = 0;
      
      public function __construct($v) {
          $this-&gt;v = $v;
      }
      
      public function mul() {
          return function ($x) {
              return $this-&gt;v * $x; 
          };
      }
  }
  
  $one = new Number(1);
  $two = new Number(2);
  $double = $two-&gt;mul()-&gt;bindTo($one);
  echo $double(5);
  </code></pre>
  <p>I understand the code, but putting together it doesn't make sanse to me. The answer should be 5 btw.</p>
  <p>Thank you in advance.</p>