I have the following code:
namespace Acme\\StoreBundle\\Entity; use Doctrine\\ORM\\Mapping as ORM; /** * Acme\\StoreBundle\\Entity\\User * * @ORM\\Tabl
You can use php's instanceOf operator:
if($a instanceof MyClass) { /*code*/ }
https://www.php.net/manual/pt_BR/language.operators.type.php