3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo {} define('FOOx', new Foo()); FOOx;
Output for 7.0.0 - 7.1.0
Warning: Constants may only evaluate to scalar values or arrays in /in/M48oD on line 5 Notice: Use of undefined constant FOOx - assumed 'FOOx' in /in/M48oD on line 7
Output for hhvm-3.12.0
Warning: Constants may only evaluate to scalar values in /in/M48oD on line -1 Notice: Use of undefined constant FOOx - assumed 'FOOx' in /in/M48oD on line -1
Output for 4.3.0 - 5.6.28, hhvm-3.10.0
Warning: Constants may only evaluate to scalar values in /in/M48oD on line 5 Notice: Use of undefined constant FOOx - assumed 'FOOx' in /in/M48oD on line 7