3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh type RETTYPE<T> = shape('t' => demo<T>, 'z' => demo<Z>); class demoStart<T> { const RET = RETTYPE<T>{1,2}; } class demo<T> { const RET = T; } type test = shape('demo' => demoStart<int>{1,2}); echo test; //type Point<T> = shape ('x' => T, 'y' => T);
Output for 5.3.0 - 5.4.32
<?hh type RETTYPE<T> = shape('t' => demo<T>, 'z' => demo<Z>); class demoStart<T> { const RET = RETTYPE<T>{1,2}; } class demo<T> { const RET = T; } type test = shape('demo' => demoStart<int>{1,2}); echo test; //type Point<T> = shape ('x' => T, 'y' => T);