3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php global $message; $message = "hello world"; function greeting(){ global $message; echo $message; } function otherGreeting(){ global $message; echo $message; } greeting(); otherGreeting(); echo $GLOBALS;
based on MIa1R
Output for 5.4.0 - 7.2.6
hello worldhello world Notice: Array to string conversion in /in/PNCgV on line 17 Array
Output for 4.3.0 - 5.3.29
hello worldhello worldArray