3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function isMangled($key) { $arr = array(); $arr[$key] = null; return (string) $key !== (string) key($arr); } var_dump( isMangled(1), isMangled(1.5), isMangled('1'), isMangled('1.5'), isMangled(null), isMangled("test"), isMangled("test\0") );
based on r2MLs
Output for 4.3.0 - 7.1.10
bool(false) bool(true) bool(false) bool(false) bool(false) bool(false) bool(false)