3v4l.org

run code in 300+ PHP versions simultaneously
<?php print("This diff detects unused expressions and removes them. ". "Unused expressions include: variables, classes/functions ". "private class members, arrays, invocation arguments, ". "object declarations and object spreads.\n". "You should carefully review diffs from this codemod as ". "side effects may occur from unused variable initialization.\n". "[Read more about side effects here](https://fb.quip.com/7pdSA9i4tBEo)". <<<EOT **Read this before requesting changes**: . If this diff removes necessary side effects, you should commandeer this diff and remove any unused expressions so the codemod no longer considers the code dead. For example: ``` const deadVar = sideEffect(); // should be changed to sideEffect(); // you could also add _ prefix to the variable const _deadVar = sideEffect(); EOT );
Output for 7.1.25 - 7.1.30, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
This diff detects unused expressions and removes them. Unused expressions include: variables, classes/functions private class members, arrays, invocation arguments, object declarations and object spreads. You should carefully review diffs from this codemod as side effects may occur from unused variable initialization. [Read more about side effects here](https://fb.quip.com/7pdSA9i4tBEo)**Read this before requesting changes**: . If this diff removes necessary side effects, you should commandeer this diff and remove any unused expressions so the codemod no longer considers the code dead. For example: ``` const deadVar = sideEffect(); // should be changed to sideEffect(); // you could also add _ prefix to the variable const _deadVar = sideEffect();

preferences:
220.19 ms | 404 KiB | 168 Q