PHP 中的 ctype_lower()函数

首页 / PHP入门教程 / PHP 中的 ctype_lower()函数

ctype_lower() - 语法

ctype_lower ( $text );

此函数检查提供的字符串text中的所有字符是否都是小写字母。

Sr.No Parameter & Description
1

text(必需)

匹配字符串。

ctype_lower() - 返回值

如果文本中的每个字符都是当前区域设置中的小写字母,则返回true。

ctype_lower() - 示例

<?php
   $strings=array('aac123', 'testing', "testin IS Done");
   
   foreach ($strings as $test) {
      if (ctype_lower($test)) {
         echo "$test consists of all lowercase letters.\n";
      }else {
         echo "$test does not have all lowercase letters.\n";
      }
   }
?> 

这将产生以下输出-

aac123 does not have all lowercase letters.
testing consists of all lowercase letters.
testin IS Done does not have all lowercase letters.

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

趣谈网络协议 -〔刘超〕

技术管理实战36讲 -〔刘建国〕

Android开发高手课 -〔张绍文〕

后端技术面试 38 讲 -〔李智慧〕

分布式数据库30讲 -〔王磊〕

搞定音频技术 -〔冯建元 〕

大厂设计进阶实战课 -〔小乔〕

超级访谈:对话毕玄 -〔毕玄〕

手把手带你写一个 MiniTomcat -〔郭屹〕

好记忆不如烂笔头。留下您的足迹吧 :)