The backtick (`) operator is deprecated, use shell_exec() instead

Description

The back tick operator `` ` `` is the equivalent to the function shell_exec(). It is being deprecated since PHP 8.5.

Example

<?php

echo `ls`;

?>

Solutions

  • Use shell_exec() instead.

Changed Behavior

This error may appear following an evolution in behavior, in previous versions. See backtick.

Static Analysis

This error may be tracked down with the following static analysis rules: Php/DeprecatedBackTicks.