Page MenuHomePhorge

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$xAnything.
Return
wildUnmodified argument.