3v4l.org

run code in 300+ PHP versions simultaneously
<?php $config['item1'] = 'value1'; $config['item2'] = 'value2'; $config['item3'] = 'value3'; function __autoload(){ connect(); } function connect() { global $config; print_r($config); } __autoload();
Output for 5.0.1 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.38
Fatal error: __autoload() must take exactly 1 argument in /in/ES4ej on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0
Array ( [item1] => value1 [item2] => value2 [item3] => value3 )

preferences:
213.5 ms | 1399 KiB | 128 Q