How to Replace switch With match in PHP 8

match is strict. No fall-through. Returns a value. One expression.

#php #match #php8 #switch #howto

https://www.youtube.com/watch?v=BFaQXqsGYS4

How to Replace switch With match in PHP 8 #howto

YouTube
PHP-Test-area

My tests in PHP

Codeberg.org

Here it is! GooseRSS! 🪿

Turn YouTube channels into RSS feeds so you can watch videos outside of YT.

And if you're into TV Shows and magnet links, that's supported too.

https://github.com/adegans/gooseRSS

#php #webdevelopment #php8 #selfhosted #rss #youtube #eztv #free #github

GitHub - adegans/gooseRSS: Simple PHP script for converting a YouTube username into a RSS feed so you'll never miss a video again.

Simple PHP script for converting a YouTube username into a RSS feed so you'll never miss a video again. - adegans/gooseRSS

GitHub
GitHub - m0x41nos/TimeAfterFree: PHP 8 Sandbox Escape

PHP 8 Sandbox Escape. Contribute to m0x41nos/TimeAfterFree development by creating an account on GitHub.

GitHub

Modern Enums Battle: Python 3.10 vs PHP 8.1!

Both languages just added enums! Python's Enum class vs PHP's native enums - which implementation wins? This is HUGE!

#python #php #pythonvsphp #enums #python3.10 #php8.1 #modernfeatures #codecomparison #programmingcomparison #pythontricks #phptricks #programmingdebate #codingtips #typesafety #enummethods

https://www.youtube.com/watch?v=Fn5YHr3lDq0

Modern Enums Battle: Python 3.10 vs PHP 8.1! #modernfeatures

YouTube

Чистое API для чтения PHP-атрибутов

Сколько строк кода вы пишете, чтобы просто прочитать один атрибут у класса? Обычно это 3-5 строк с ReflectionClass, проверкой count($attributes) > 0 и вызовом newInstance(). А если нужно найти все атрибуты Validate в свойствах, методах и параметрах — код разрастается до неприличных размеров.

Spatie выпустили элегантное решение spatie/php-attribute-reader, которое превращает это безобразие в одну строку.

https://www.dev-notes.ru/articles/php/attribute-reader/

#PHP8 #PHP

Чистое API для чтения PHP-атрибутов

Устали от многословного Reflection API для PHP-атрибутов? Узнайте, как пакет Spatie Attribute Reader заменяет 5 строк кода одной и ищет атрибуты по всему классу мгновенно.

Заметки разработчика

Match Expression vs Switch: Pattern Matching Showdown

PHP 8's match expression vs JavaScript switch. Which language's control flow is more elegant? You won't believe this!

#php #javascript #phpvsjavascript #matchexpression #switchstatement #patternmatching #php8 #programmingcomparison #codecomparison #controlflow #viralcoding

https://www.youtube.com/watch?v=BiiJf3Cpbsk

Match Expression vs Switch: Pattern Matching Showdown #PHP

YouTube

Attributes vs Decorators: Metadata Systems Battle

PHP 8 attributes vs JavaScript decorators (proposed). Which language's metadata system is more powerful? This will make you rethink everything!

#php #javascript #phpvsjavascript #attributes #decorators #metadata #php8 #annotations #programmingcomparison #codecomparison #frameworkfeatures #viralcoding

https://www.youtube.com/watch?v=ZpgvS9n6grY

Attributes vs Decorators: Metadata Systems Battle #attributes

YouTube

How to Use Union Types

int|string. Accept multiple. PHP 8. Catch invalid early.

#php #uniontypes #php8 #howto

https://www.youtube.com/watch?v=BBSeFCNuHGo

How to Use Union Types #uniontypes

YouTube