Hmm, i don't quite get this...

PHP says if you have more holes than pigeons, then there is at least one hole with more than 1 pigeon.

You have 9 pigeons(stamps) and 3 holes(line of 3), so there is at least one hole with more than 1 stamp, which has no relation to the question for the following reasons:

1) each hole can only have 0 or 1 stamp, not more than 1

2) question wants a maximum of 2 stamps in 3 holes vertically, horizontally or diagonally

Hmm...i am not sure if i am missing something but this doesn't look like it works?

It's not a usual pigeonhole question, that's why it is difficult to explain. It's mostly picking items, like a deck of cards, socks, things you would usually see in a probability type question.

It's actually the other way around: more pigeons than pigeonholes means there is at least hole with more than one pigeon.

The rule: If there are (n+1) pigeons and n holes, there is at least 2 pigeons in one hole.

I didn't explain it clearly, there are 3 rows (pigeonholes) that can have 2 stamps each; but on the 7th stamp (pigeon), there will be a row of 3, either diagonally, vertically or horizontally. So 6 stamps (2 per row) is the maximum amount of stamps that doesn't form a 3 in a row on the grid.