- var_dump: documentation ( source)
- mb_check_encoding: documentation ( source)
- preg_match: documentation ( source)
- function_exists: documentation ( source)
<?php
function dostuff() {
echo 'mb_check_encoding: ';
if ( function_exists( 'mb_check_encoding' ) ) {
var_dump( mb_check_encoding( "\xF4\x90\x80\x80", 'UTF-8' ) );
} else {
echo "absent\n";
}
echo 'preg_match: ';
if ( function_exists( 'preg_match' ) ) {
var_dump(preg_match( '//u', "\xF4\x90\x80\x80" ));
} else {
echo "absent\n";
}
}
dostuff();