Moreover, any numbers you set to a player's health must be a real (therefore finite) number. Study mathematics if you don't understand. If you want to set a player to infinite health, just cancel every health change event of his, or set his health to a very large number (PHP_INT_MAX). Don't be lazy.