<?php

class Person {
	protected $name = "";

	public function __construct($name) {
		$this->name = $name;
	}

	public function getName() {
		return $this->name;
	}
}

function showPerson(Person $person) {
	if ($person === null)
		echo("Person is null, this should not happen because the type hint should cause an error on null values!\n");
}

function showOptionalPerson(Person $person = null) {
	if ($person === null)
		echo("Person is null, which is allow by this function\n");
}

showPerson(null);         // This call should throw an error because null values are not allowed according to the definition of showPerson()
showOptionalPerson(null); // This call is OK

?>