3v4l.org

run code in 200+ php & hhvm versions
<?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 );
based on rj35P
Output for 7.1.25 - 7.4.0alpha2
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();