PHP: How to convert bigint from int to string?

后端 未结 4 1423
礼貌的吻别
礼貌的吻别 2020-12-04 01:44

I want to be able to convert big ints into their full string derivatives.

For example.

$bigint = 9999999999999999999;
$bigint_string = (string) $bigi         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-04 02:06

    Just store the value as string and display...!

       $bigint = '9999999999999999999';
    
        var_dump($bigint);
    

    Output:

    string(19) "9999999999999999999"
    

提交回复
热议问题