title: How to take multiple standard input in a single line using php command line
body: <pre><code>like Input is:
  3
  1 2
  2 3
  4 5
  </code></pre>
  
  <p>I have to take those input in given style. Here (1 and 2), (2 and 3) and (4 and 5) have to take in one line as a input.</p>
  
  <p>Here is my code snippet.</p>
  
  <pre><code> &lt;?php
  header('Content-Type: text/plain');
  
  $testCase = (int) fgets(STDIN);
  
  while($testCase--) {
      $myPosition = (int) fgets(STDIN);
      $liftPosition = (int) fgets(STDIN);
  }
  </code></pre>
  
  <p>Implementation in C++</p>
  
  <pre><code>int main()
  {
     int testcase, myPos, liftPos;
  
     cin &gt;&gt; testcase;
  
     while(testcase--)
     {
        cin &gt;&gt; myPos &gt;&gt; liftPos;
     }
  }
  </code></pre>
  
  <p>So, how can implement the C++ code in PHP ?</p>