3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function array_flatten($array, $keychain = '/', $data = '') { if (!is_array($data)) $data = $array(); foreach($array as $key=> $value) { if(is_array($value)) { $data = array_merge($data, array_flatten($value, $keychain.$key.'/')); } else { $data[$keychain.$key] = $value; } } return $data; } $array = array( array( 'foo' = > 'bar', 'baz' => 'blah' ), array( 'foo' = > 'bar', 'baz' => 'blah' ) ); var_dump(array_flatten($array);
Output for 5.3.0 - 5.4.8
Parse error: syntax error, unexpected '=', expecting ')' in /in/uIYpC on line 20
Process exited with code 255.