定義和用法FILTER_SANITIZE_NUMBER_INT 過濾器刪除數字中所有非法的字元。該過濾器允許所有數字以及. + - Name: "number_int" ID-number: 519實例<?php$number="5-2+3pp";var_dump(filter_var($number, FILTER_SANITIZE_NUMBER_INT));?>程式碼的輸出如下所示: string(5) "5-2+3"