Server IP : 104.21.38.3 / Your IP : 172.70.142.19 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/lapma.in/phpMyAdmin/vendor/thecodingmachine/safe/generated/ |
Upload File : |
<?php namespace Safe; use Safe\Exceptions\GmpException; /** * Calculates the binomial coefficient C(n, k). * * @param \GMP|string|int $n Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number. * @param int $k * @return \GMP Returns the binomial coefficient C(n, k). * @throws GmpException * */ function gmp_binomial($n, int $k): \GMP { error_clear_last(); $result = \gmp_binomial($n, $k); if ($result === false) { throw GmpException::createFromPhpError(); } return $result; } /** * Export a GMP number to a binary string * * @param \GMP|string|int $gmpnumber The GMP number being exported * @param int $word_size Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with the options parameter. * @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. * @return string Returns a string. * @throws GmpException * */ function gmp_export($gmpnumber, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string { error_clear_last(); $result = \gmp_export($gmpnumber, $word_size, $options); if ($result === false) { throw GmpException::createFromPhpError(); } return $result; } /** * Import a GMP number from a binary string * * @param string $data The binary string being imported * @param int $word_size Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with the options parameter. * @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. * @return \GMP Returns a GMP number. * @throws GmpException * */ function gmp_import(string $data, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): \GMP { error_clear_last(); $result = \gmp_import($data, $word_size, $options); if ($result === false) { throw GmpException::createFromPhpError(); } return $result; } /** * * * @param \GMP|string|int $seed The seed to be set for the gmp_random, * gmp_random_bits, and * gmp_random_range functions. * * Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number. * @throws GmpException * */ function gmp_random_seed($seed): void { error_clear_last(); $result = \gmp_random_seed($seed); if ($result === false) { throw GmpException::createFromPhpError(); } }