1.2.1089. Shell Favorite

PHP has several syntax to make system calls : shell_exec(), exec() and back-ticks, ` are the common ones.

It was found that one of those three is actually being used over 90% of the time. The remaining cases should be uniformed, so has to make this code consistent.

<?php

// back-ticks &#96; are only used once.
&#96;back-tick&#96;;

shell_exec('exec1');
shell_exec('exec2');
shell_exec('exec3');
shell_exec('exec4');
shell_exec('exec5');
shell_exec('exec6');
shell_exec('exec7');
shell_exec('exec8');
shell_exec('exec9');
shell_exec('exec10');
shell_exec('exec11');
shell_exec('exec12');

?>

See also Execution Operators, shell_exec() and ptlis/shell-command.

1.2.1089.1. Specs

Short name

Php/ShellFavorite

Rulesets

All, Changed Behavior, Preferences

Exakat since

0.12.9

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

shell

Available in

Entreprise Edition, Exakat Cloud