3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php global $message; $message = "hello world"; function greeting(){ echo $message; } function otherGreeting(){ echo $message; } greeting(); otherGreeting();
based on 8OFW9
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: message in /in/i5WCk on line 5 Notice: Undefined variable: message in /in/i5WCk on line 9
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: message in /in/i5WCk on line 5 Notice: Undefined variable: message in /in/i5WCk on line 9