Not everyone knows that php can handle variables that have first characters as numbers, spaces, or other special language reserved words and characters in it. And it seems for whoever coded extract function this esoteric knowledge was not known..
${0} = 'bug';
$array = array('some value','some other value');
extract($array); // //no error code is returned whatsoever
echo ${0}; // returns 'bug'
echo ${1}; //Notice: Undefined variable 1 in...
ok, let’s do the other way around:
$array = compact(0); // no error...
print_r($array); // Array() - no seriously, what the...
This is MADNESS !! It can lead to serious and hard to spot errors in code. Moreover, script could run as happy as nothing happened until you see with your paleface that something in the output is completely messed.
PHP is open source. Feel free to contribute a patch to fix this behavior if you feel it should be fixed and/or join the PHP mailing list to discuss this topic with other PHP developers.
Simply ranting is pointless, especially here.