lchgrp()

lchgrp() — Changes group ownership of symlink.

Built-in function of PHP 8.5. The manual lists it as available in PHP 5 >= 5.1.3, PHP 7, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.

What it does

Attempts to change the group of the symlink filename to group.

Signature

lchgrp(string $filename, string|int $group): bool

Parameters

ParameterTypeWhat it takes
$filenamestringPath to the symlink.
$groupstring|intThe group specified by name or number.

Return value

Returns true on success or false on failure.

Example

A runnable snippet:

$target = 'output.php'; $link = 'output.html'; symlink($target, $link); lchgrp($link, 8);

See also

chgrp(), lchown(), chown(), chmod()

All PHP 8.5 built-in functions

Reference card built from the PHP manual page lchgrp() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.