3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh echo "1..2\n"; interface Bonk<T> { } class Foo<X> { function beep() { echo "ok 1\n"; } } class Bar<T> extends Foo<Bar<Foo<T>>> implements Bonk<T> { } class :bork { attribute Bar<String> foo; } function nest(Foo<B<C<D<E<F<G<H<I<J<B>,C>>,D>>>,E>>>> $bonk) { echo "ok 2\n"; } Bar::beep(); nest(new Foo());
based on qngY6
Output for hhvm-3.12.0
1..2 ok 1 ok 2
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.0 - 5.4.32
<?hh echo "1..2\n"; interface Bonk<T> { } class Foo<X> { function beep() { echo "ok 1\n"; } } class Bar<T> extends Foo<Bar<Foo<T>>> implements Bonk<T> { } class :bork { attribute Bar<String> foo; } function nest(Foo<B<C<D<E<F<G<H<I<J<B>,C>>,D>>>,E>>>> $bonk) { echo "ok 2\n"; } Bar::beep(); nest(new Foo());