PHP Notes

You can find useful tutorials online for Laravel in the Laravel documentationarrow-up-right, Laracasts discussion forumarrow-up-right, Treehousearrow-up-right, Sitepointarrow-up-right, and Codebrightarrow-up-right.

The Laravel Github docsarrow-up-right are also extensive and provide excellent information that Symfony doesn’t provide.

Книга Symfony:

Symfony profiling:

https://symfony.com/doc/current/profiler.html?ref=hackernoon.comarrow-up-right

Как использовать yield?:

yield + return

https://medium.com/just-tech/working-with-php-generators-57586e61f19aarrow-up-right

Как использовать Generator?:

https://nikic.github.io/2012/12/22/Cooperative-multitasking-using-coroutines-in-PHP.htmlarrow-up-right

https://medium.com/just-tech/working-with-php-generators-57586e61f19aarrow-up-right

A generator allows you to write code that uses foreacharrow-up-right to iterate over a set of data without needing to build an array in memory, which may cause you to exceed a memory limit, or require a considerable amount of processing time to generate.

Что за конструкция static function (как аргумент)?

В общем статическая анонимная функция прибавляет немного производительности в отличие от обычной анонимной функции. Если нам не нужен $this в этой фнкции, то мы можем указать static, но это некритично.

It is worth noting that in context of a class, static anonymous functions yield micro performance improvements and may be suggested in any instances which you do not need the containing class to be bound to the anonymous function.

Как используются замыкания в PHP?

https://wiki.php.net/rfc/closuresarrow-up-right

Для чего нужно Late Static Bindings?

Чтобы вызвать метод в контексте не где он объявлен, а где вызван:

https://www.youtube.com/watch?v=MxRrCV_3VSQarrow-up-right

Когда использовать immutable objects?

Посмотреть инструмент PHP metrics.

https://www.phpmetrics.org/arrow-up-right

Тестирование:

Посмотреть, как они делаются здесь.

https://github.com/yiisoft/validatorarrow-up-right

Сайт, на котором собран 61 PHP-инструмент для анализа кода, управления зависимостями, тестов: https://phpqa.io/arrow-up-right А в этом репозитории ещё свыше ста линтеров, форматтеров и статических анализаторов: https://tprg.ru/lptvarrow-up-right #php #инструментыt.me/tproger_web/1004arrow-up-right

PHPStorm auto indent

https://plugins.jetbrains.com/plugin/7642-save-actionsarrow-up-right

Last updated