3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define (“MYCONSTANT”,150); define (“MYCONSTANT”,160); echo MYCONSTANT; $n = $i = 5; while ($i--) echo str_repeat(' ', $i).str_repeat('* ', $n - $i)."\n"; ?>
based on JdY08
Output for 7.2.0
Warning: Use of undefined constant “MYCONSTANT” - assumed '“MYCONSTANT”' (this will throw an Error in a future version of PHP) in /in/pBjv0 on line 2 Warning: Use of undefined constant MYCONSTANT - assumed 'MYCONSTANT' (this will throw an Error in a future version of PHP) in /in/pBjv0 on line 5 MYCONSTANT * * * * * * * * * * * * * * *
Output for 5.3.18 - 7.1.10
Notice: Use of undefined constant “MYCONSTANT” - assumed '“MYCONSTANT”' in /in/pBjv0 on line 2 Notice: Use of undefined constant MYCONSTANT - assumed 'MYCONSTANT' in /in/pBjv0 on line 5 MYCONSTANT * * * * * * * * * * * * * * *