3v4l.org

run code in 300+ PHP versions simultaneously
<?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();

preferences:
33.35 ms | 402 KiB | 5 Q