0

We are using phplint to check our code and I am trying to find an option that would make it fail if there is a var_dump somwehere in the code. As I could not find an option for it, is there another way to achieve this?

Thanks for your help!

Sebastian Bergmann
  • 7,837
  • 1
  • 27
  • 35
Joe Hager
  • 57
  • 5
  • 2
    The only thing I can think of is run it with it's own PHP.ini, and add that function to the disabled function list in that ini file. [Disable functions](https://stackoverflow.com/questions/1865020/php-how-to-disable-dangerous-functions) – ArtisticPhoenix Apr 10 '18 at 07:51

1 Answers1

2

A static analysis tool such as PHP_CodeSniffer can (and should) be used to perform a check such as the one you describe.

Sebastian Bergmann
  • 7,837
  • 1
  • 27
  • 35