Hacker News new | ask | show | jobs
by mike_d 1512 days ago
You'd have to rewrite a good portion of all existing PHP code to eliminate the "{$var}" syntax. It is the "right" way to include variables in a string.
1 comments

PHPStorm/PHPStan (I'm not certain which) will tell me `"My {$var} string"` doesn't need the `{}`, but won't give me the same notice when using `"My {$obj->getVar()} string"`. Personally, I prefer keeping the `{}`.