PHP code example of tasoft / php-secure-int64-extension

1. Go to this page and download the library: Download tasoft/php-secure-int64-extension library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tasoft / php-secure-int64-extension example snippets



var_dump( extension_loaded('secure_int64') ); // Should be true


echo sint64_array_to_string([1]); // 1
echo sint64_array_to_string([1, 4]); // 260
echo sint64_array_to_string([0xFF, 0xFF]); // 65535

echo sint64_array_to_string([0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]); // 9223372036854775807
echo sint64_array_to_string([0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]); // -1

echo uint64_array_to_string([0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]); // 18446744073709551615

bin
$ php --ini