This library will convert Malaysia Postal Code to State
composer require wilzokch/php-malaysia-postcode-to-state
use Wilzokch\MalaysiaPostcodeToState\MyPostCode;
$postCode = new MyPostCode('84000');
echo $postCode->getState(); // you will get "Johor"