$aa = preg_replace('/(?<=[0-9])(?=(?:[0-9]{3})+(?![0-9]))/',',',12345674.22); //输出:12,345,674.22 dump($aa);die();