bool is_numeric ( mixed $var )

此函数用于判断变量是否数字或者数字字符串,不仅能接受十进制,还能接受十六进制,这样就有了绕过的方法

<?php
echo is_numeric(123);       # 1
echo is_numeric('123');    # 1
echo is_numeric(0x123);    # 1
echo is_numeric('0x123');   # 1
echo is_numeric('123abc');  # 0
?>

 

 

后期根据学习更新....

相关文章:

  • 2021-08-17
  • 2021-07-29
  • 2021-06-02
  • 2021-11-16
  • 2021-12-31
  • 2021-12-08
  • 2021-07-03
  • 2022-01-07
猜你喜欢
  • 2022-03-03
  • 2022-02-02
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案