Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
PHP
php check if object has attribute
Mutturaj
Programming language:
PHP
2021-05-08 03:28:17
0
Q:
php check if object has attribute
Glen_b
Code:
PHP
2021-07-08 14:02:42
if(property_exists($car,color)){ //$car->color exists }
1
Tags
object
php
check
attribute
Related
php is object
php if is json object
New to Communities?
Join the community