How to pass a parameter into a PHP class constructor?

Your syntax is right:

 $obj = new \Apiclass($apikey);