Answers for "php check if class has properties"

PHP
3

php check if object has attribute

if(property_exists($car,color)){
	//$car->color exists
}
Posted by: Guest on June-19-2019
3

php check if class exists

if(class_exists('dbinfo')){
Posted by: Guest on March-24-2020

Browse Popular Code Answers by Language