PHP struggles with attributes syntax
PHP struggles with attributes syntax
Posted Aug 8, 2020 5:43 UTC (Sat) by iteratedlateralus (guest, #102183)In reply to: PHP struggles with attributes syntax by flussence
Parent article: PHP struggles with attributes syntax
The backslashes definitely weren't something I totally agreed with. I recall being in #php on Freenode, and saying that the backslash was too much of a shock (especially since it's an escape sequence). I said it would be use if they instead used the :: (the infamous php operator that I can't pronounce).
Something like:
use App::Models::FooBar;
The current syntax, for those who aren't php devs, is:
use \App\Models\FooBar;
