Showcase: The create() functionat 2007-05-06 in Examples by friebe (0 comments) As a side product of RFC #0106, the create() core functionality, which is used to create generic objects, provides an overloaded variant of itself: When passed an object, it will return it.This may seem a bit strange (and kind of useless) in the first moment, but actually solves a deficit in the PHP parser, which does not allow chaining after new: <?php By using create(), we can work around this as follows: <?php |
|