Run Rector on your code to see what it can do for you:
<?php // imagine this being dynamic, not just a const string.. -$command = 'echo "%s"'; +$command = 'echo "%s"'; +assert(...); -assert(is_string($command)); -passthru(sprintf($command, $foo)); +is_string(...); +passthru(...); +sprintf($command, $foo); -echo $command; +echo $command;
Applied Rules:
Not a change you expect?
rector.php