- var_dump: documentation ( source)
- mb_check_encoding: documentation ( source)
- microtime: documentation ( source)
- preg_match: documentation ( source)
<?php
function dostuff() {
echo 'mb_check_encoding: ';
$st = microtime( true );
$ans = mb_check_encoding( "成都瑞雪精密机械有限公司", 'UTF-8' );
$et = microtime( true );
echo $et - $st, 's ';
var_dump( $ans );
echo 'preg_match: ';
$st = microtime( true );
$ans = preg_match( '//u', "\xF4\x90\x80\x80" );
$et = microtime( true );
echo $et - $st, 's ';
var_dump( $ans );
}
dostuff();