function id($x)Arcanist Technical Documentation ()
function id($x)
Arcanist Technical Documentation ()
Identity function, returns its argument unmodified.
This is useful almost exclusively as a workaround to an oddity in the PHP grammar -- this is a syntax error:
new Thing()->doStuff();
...but this works fine:
id(new Thing())->doStuff();
Parameters
wild | $x | Anything. |
Return
wild | Unmodified argument. |
- Defined
- src/utils/utils.php:19