I have just measured a large chunk of PHP code (1153 lines) using PHPMD (http://phpmd.org/) and it tells me the code has an NPath complexity of 16244818757303403077832757824.
That looks like a crazily big number to me, suggesting that perhaps PHPMD has broken in some way. Is it even possible for a piece of code written by humans to have such a high NPath complexity? The cyclomatic complexity is 351.
Two possibly important details -
This was procedural code, mixed in with HTML, and PHPMD will only measure object-oriented code. To get around this, I wrapped the whole file in a class with a single function - this is representative of how it's used.
The file consists of a series of nested switch statements, and inside those there are lots of if..else statements - so it's certainly pretty complicated.
Edit
I want to clarify that I'm not questioning whether PHPMD is lying to me. I know that the code is an awful mess, I just wonder if it's possible for any code to be really that bad. It seems like the answer is yes, it's very possible.
WP_Query::get_posts()
had a NPath complexity of 1.435 Quindecillion in 2013. It is even worse nowadays …