You can specify what type of data expected in a function declaration. It could be Array type, int type, object type data.
<?php class Book{ public $price; public $authors; function getPrice(int $price){ $this->price = $price; } function Authors(array $name){ $this->authors = $name; } } $book = new Book; $book->getPrice(100); echo $book->price; echo "<br/>"; $book->Authors(['Araf','Jahir']); print_r($book->authors);