I have a game of cards where the user turns the card several times and the system must calculate the probability of the user to win according to the configuration, as in the example:

Winners allowed per day: 100 Probability of some winning: 5%

Hence, 100 winners per day will be allowed, each turn has the probability of 5% being an award winning card.

Does anyone have an idea how to perform a function or calculation that allows doing this in php?