title: Void as return type
body: <p>I was testing return types with PHP 7.</p>
  
  <p>I've created a simple script to test return types of PHP 7:</p>
  
  <pre><code>&lt;?php
  
  Class Obj {
  
      public function __construct(){
  
      }
  
      public function test(): string { //a string needs to be returned
          return "ok";
      }
  
  }
  
  function foo(): Obj { //instance of Obj needs to be returned
      return new Obj();
  }
  
  $o = foo();
  echo $o-&gt;test(); // output: ok
  </code></pre>
  
  <p>Now in other programming languages when you specify a return type <code>void</code> it means you cannot return anything or you will get an error. So I wrote this script:</p>
  
  <pre><code>&lt;?php
  
      function foo(): void {
  
      }
  
      foo(); 
  </code></pre>
  
  <p>Now in above script the expected output is nothing. 
  Instead it gives me a Fatal error:</p>
  
  <blockquote>
    <p>Fatal error: Return value of foo() must be an instance of void, none returned on line 2</p>
  </blockquote>
  
  <p>My question is (I couldn't find it), in PHP 7 will there be a similar <code>void</code> type?</p>