3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arry = [ 'company' => [ 'salesChannel' => [ 'type' => '', ], ] ]; function walkR(&$arry, $value) { foreach ($arry as &$elem) { if (is_array($elem)) { walkR($elem, $value); } else { $elem = $value; } } } $value = function () { return 'I\'m from closure'; }; walkR($arry, $value); $vars = new ArrayObject($arry); $vars = $vars->getArrayCopy(); extract($vars); $company['salesChannel']['type']();
based on SrMeg
Output for 5.4.2 - 7.2.0
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/FN16l on line 3
Process exited with code 255.