3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); class Mage { public static function dispatchEvent($args) { $observer = new stdClass(); $observer->data = $args; $vars = $observer->data['vars']; $vars['order'] = '#1000000123'; } } $vars = array(); Mage::dispatchEvent(array('vars' => $vars)); print_r($vars); Mage::dispatchEvent(array('vars' => &$vars)); print_r($vars);
based on ZrP6N
Output for 5.5.0 - 7.2.6
Array ( ) Array ( )