📜  php 检查数字是否以 0 开头 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:10.701000             🧑  作者: Mango

代码示例1
Use substr function:

if (substr($str, 0, 1) == '0' || substr($str, 0, 2) == '00') {
    //=> matched
}