[英]What is the simplest way to prevent Error return In a GET request from an object in PHP
in my case Suppose an $object is completely empty And I ask him在我的情况下假设一个 $object 是完全空的我问他
object ->get_id
What's the shortest way a whip will return empty鞭子返回空的最短方式是什么
$id = isset($object) && isset($object->get_id) ? $object->get_id : null;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.