Reputation: 12227
Adobe Dreamweaver highlights the word object
in PHP sources and I'm wondering why. It's definitely not the name of the generic class, which is generic
(Edit: sorry, it's actually stdClass
not generic
, which I always define myself in all projects).
And as you might have guessed it's not easy to google for answers to this question.
Upvotes: 0
Views: 83
Reputation: 723708
object
is a data type in PHP. You typically find it in statements that cast stuff to objects. Additionally, passing an object to gettype()
causes it to return the string 'object'
(it's not a keyword, it just tells you that it's an actual PHP data type).
The "generic" class in PHP is stdClass
. I haven't heard of generic
being a PHP keyword, ever.
Upvotes: 2
Reputation: 18985
http://www.php.net/manual/en/reserved.keywords.php does not include "object
" (nor "generic
", actually; maybe you mean stdClass
?).
Upvotes: 0