It seems quite strange that some function is defined when it is called by web browsers, but it becomes undefined in command line mode.
For example,
<?php
echo function_exists('mb_detect_encoding') ? 'yes' : 'no';
?>
When it runs in the browsers, it prints "yes" which means this function is already defined.
But when I run this piece of code in command line, it prints "no"
Why? what settings did I miss in command line mode?