09. The Stringable Interface - Front Line PHP

preview_player
Показать описание
In this video we look at the `Stringable` interface, which gets magically added to all classes that implement `__toString`.

Links:

Рекомендации по теме
Комментарии
Автор

You don't need to cast to string here, echo will do that with any object that has a __toString() method.

jurchiks
Автор

Thank you for Your work!!! I like Your cache bundle - good work ;) . I like php also, but it becomes like a Chinese fake of other languages. Mixed types from TS (strange implementation for OOP), promoted properties from TS, null safe operator from js, duck typing from golang. What will be the next. I thought that after stealing some features from ruby and python php community will stop stealing and introduce new, special only for php, features, but not these sugar. IMHO.

ajdanil
visit shbcf.ru