Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: php-5.3.14
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (29 sloc) 0.605 kb
ZE2 class type hinting
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
interface Foo {
function a(Foo $foo);
interface Bar {
function b(Bar $bar);
class FooBar implements Foo, Bar {
function a(Foo $foo) {
// ...
function b(Bar $bar) {
// ...
class Blort {
$a = new FooBar;
$b = new Blort;
Catchable fatal error: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s on line 12
Jump to Line
Something went wrong with that request. Please try again.