跑一段代码遍历所有汉字


<?php
//
跑一段代码遍历所有汉字虽然觉得这样遍历没啥意思, 还是记录下。
header('Content-Type: text/html;charset=utf8');

$start = hexdec('4e00'); $end = hexdec('9fa5');

 for($i=$start; $i<$end; $i++) {

     print_r(json_decode('["\u'.dechex($i).'"]'));
     echo ("<br>");
 }
?>

 

posted @ 2015-07-13 17:28  SunsCheung  阅读(262)  评论(0编辑  收藏  举报