3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { static function hello(){ echo "Hello World\n"; } } $y[0] = 'hello'; echo "A::${y[0]}"; echo A::${y[0]};
based on VjvOv

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
A::hello Notice: Use of undefined constant y - assumed 'y' in /in/Mo2sV on line 12 Fatal error: Uncaught Error: Access to undeclared static property: A::$y in /in/Mo2sV:12 Stack trace: #0 {main} thrown in /in/Mo2sV on line 12
Output for Array change keys
A::hello Notice: Use of undefined constant y - assumed 'y' in /in/Mo2sV on line 12 Fatal error: Uncaught Error: Access to undeclared static property: A::$y in /in/Mo2sV:12 Stack trace: #0 {main} thrown in /in/Mo2sV on line 12
Output for Lexical anon
A::hello Notice: Use of undefined constant y - assumed 'y' in /in/Mo2sV on line 12 Fatal error: Access to undeclared static property: A::$y in /in/Mo2sV on line 12

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page