当前位置:网站首页>PHP 类函数和对象函数
PHP 类函数和对象函数
2022-08-08 23:20:00 【张康佳】
class_exists() | 查找类,返回布尔值 |
---|---|
Instanceof | 检测对象是否是给定类型的实例,返回布尔值 |
get_class_methods() | 获取一个类中的所有方法的列表,返回数组 |
Is_callable() | 检测方法是否能够被调用,第一个参数是字符串变量则检测函数。第一个参是数组,可以检测类中的方法。 可以接受另外一个参数:一个布尔值。如果参数设置为true,检查给定的方法或函数语法是否正确,而不检查是否真正存在 |
Method_exists() | 参数是一个对象(或类名)和一个方法名,如果存在返回 true |
Get_class_vars() | 函数接收类型作为参数,查询类的属性(只查询 public 属性),返回形式是关联数组。属性名为键值,属性值为键值 |
Get_parent_class() | 获取父类的名称,如果付类存在,就返回父类的名字。如果父类不存在就返回 false |
边栏推荐
- 【YOLOv5】6.0环境搭建(不定时更新)
- [PP-YOLOv2] Test a custom dataset
- PHP regular to img SRC to add the domain name
- sess.restore() 和 tf.import_meta_graph() 在使用时的一些关联
- Python object-oriented
- 2022杭电多校五 C - Slipper (dijkstra+虚拟结点)
- [Bug solution] ValueError: Object arrays cannot be loaded when allow_pickle=False
- 【CUDA】version switch freely
- AsyncTask的替代方案
- wps备份与恢复在哪里?
猜你喜欢
随机推荐
JSDay1-合并两个有序数组
tp5用cache缓存,存储手机短信验证码
[YOLOv5] 6.0 environment construction (updated from time to time)
Kubernetes 资源核心原理
meta learning
[Pytorch] Study Notes (1)
(2022牛客多校四)H-Wall Builder II(思维)
Introduction to Qt (4) - Continuous playback of pictures (the use of two timers)
2022牛客多校六 M-Z-Game on grid(动态规划)
每日一R「01」跟着大佬学 Rust
(2022牛客多校四)A-Task Computing (排序+动态规划)
Analysis of WLAN - Wireless Local Area Network
Kubernetes 企业如何落地
Excuse me: is it safe to pay treasure to buy fund on
Firewall first contact
(newcoder 15079)无关(容斥原理)
The second side of Tencent technical support internship - Tencent's father's luck is so sudden (offer received)
动手写prometheus的exporter-01-Gauge(仪表盘)
详解JS中for...of、in关键字
stm32 利用 串口接收空闲中断 + dma 实现不定长度dma 接收