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 );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rj35P
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'This+diff+detects+unused+expressions+and+removes+them.Unused+expressions+include%3A+variables%2C+classes%2Ffunctions+private+class+members%2C+arrays%2C+invocation+arguments%2C+object+declarations+and+object+spreads.%0AYou+should+carefully+review+diffs+from+this+codemod+as+side+effects+may+occur+from+unused+variable+initialization.%0A%5BRead+more+about+side+effects+here%5D%28https%3A%2F%2Ffb.quip.com%2F7pdSA9i4tBEo%29%2A%2ARead+this+before+requesting+changes%2A%2A%3A+.%0AIf+this+diff+removes+necessary+side+effects%2C+you+should+commandeer%0Athis+diff+and+remove+any+unused+expressions+so+the+codemod+no+longer%0Aconsiders+the+code+dead.+For+example%3A%0A%60%60%60%0Aconst+deadVar+%3D+sideEffect%28%29%3B%0A%2F%2F+should+be+changed+to%0AsideEffect%28%29%3B%0A%2F%2F+you+could+also+add+_+prefix+to+the+variable%0Aconst+_deadVar+%3D+sideEffect%28%29%3B'
   21     1      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.11 ms | 1397 KiB | 13 Q