![]() ![]() In other words, it's not that " echo isn't really a function" but that " echo doesn't work like a function w.r.t. ![]() I don't think there needs to be that much of an argument between and the crux here is actually not about "real function" vs "language construct", but about "argument is delimited by parentheses" vs "argument is everything on the right (until the end of the statement or expression)", which in fact sub-divides "false functions" language constructs. On the other hand, I agree that isset ($a) should still become isset($a) (and same for array/ empty/ eval/ exit/ list/ unset and e.g. $c but should be kept as-is (or become echo ($a ?: $b).$c if the ruleset includes concat_space). $c certainly shouldn't become echo($a ?: $b). echo ($a) arguably shouldn't become echo($a) (but rather echo $a, which is actually the case with the no_unneeded_control_parentheses and include rules, not in the default ruleset but included in both and echo ($a ?: $b) arguably shouldn't become echo($a ?: $b) (but rather echo $a ?: $b, ditto).To be extra clear (and in the following you could replace echo with any of its five "special friends"): Heads-up: I've had a look at the code and it appears that, among the dozen or so "false functions" (search "Functiony"), the six echo/ print/ include/ include_once/ require/ require_once are already special-cased (search "LanguageConstruction") but only for a very specific pattern ( #1237, in which the parentheses are actually unnecessary, by the way). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |