php查找字符串中第一个非0的位置截取 $str = '00000000000000000000000000000000000000001234506'; $preg = '/[0]*/'; $result = preg_replace($preg, '', $str, 1);