krakjoe / tombs

Detect unused code in production
Other
433 stars 20 forks source link

Duplicate tombs #19

Open edsrzf opened 3 years ago

edsrzf commented 3 years ago

In some cases we're seeing duplicate tombs (usually no more than 2-3) when running against our code base. We're using PHP 7.2, served using Nginx + php-fpm.

I'm not very familiar with PHP internals or PHP extensions, but it looks like this means that the statement_handler extension hook is being called multiple times for the same function. Is this expected? If so, is there an easy way for the tombs extension to de-duplicate these functions?

It's okay if the answer is no, as we're already doing some post-processing on the dumped tombs and can de-duplicate at that stage, but it would be nice if there were a way to do it earlier.