<?php
$numero = "5";
$decimal = "30";
echo (int)$numero + ((int)$decimal / 100.0);
echo "\n";
else echo "melhor não calcular, tem erro aí";
$decimal = "a30";
echo "\n";
echo (int)$numero + ((int)$decimal / 100.0);
echo "\n";
else echo "melhor não calcular, tem erro aí";
//https://pt.stackoverflow.com/q/342357/101
PD9waHAKJG51bWVybyA9ICI1IjsKJGRlY2ltYWwgPSAiMzAiOwplY2hvIChpbnQpJG51bWVybyArICgoaW50KSRkZWNpbWFsIC8gMTAwLjApOwplY2hvICJcbiI7CmlmIChpc19udW1lcmljKCRudW1lcm8pICYmIGlzX251bWVyaWMoJGRlY2ltYWwpKSBlY2hvIChpbnQpJG51bWVybyArICgoaW50KSRkZWNpbWFsIC8gMTAwLjApOwplbHNlIGVjaG8gIm1lbGhvciBuw6NvIGNhbGN1bGFyLCB0ZW0gZXJybyBhw60iOwokZGVjaW1hbCA9ICJhMzAiOwplY2hvICJcbiI7CmVjaG8gKGludCkkbnVtZXJvICsgKChpbnQpJGRlY2ltYWwgLyAxMDAuMCk7CmVjaG8gIlxuIjsKaWYgKGlzX251bWVyaWMoJG51bWVybykgJiYgaXNfbnVtZXJpYygkZGVjaW1hbCkpIChpbnQpJG51bWVybyArICgoaW50KSRkZWNpbWFsIC8gMTAwLjApOwplbHNlIGVjaG8gIm1lbGhvciBuw6NvIGNhbGN1bGFyLCB0ZW0gZXJybyBhw60iOwoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMzQyMzU3LzEwMQ==