I am reading through
PHP Objects, Patterns and Practice 4th Ed and on page 41,
Constant Properties chapter says:
Constant properties can contain only primitive values. You cannot assign an object to a constant.
But objects are also primitive values according to the official documentation, as shown here: http://php.net/manual/en/language.types.intro.php
- Is this an error in the book? It wouldn't be the only one
- Should one try to report it? The book is quite old and I could not find an obvious place to report errors
Hope this question is appropriate for [programmers.se]