by Example
Показать выпадающий список
Configuration of gmp_popcount()
Эта страница доступна только на английском языке.
<?php
/**
* PHP By Example
*
* @copyright 2014 Michel Corne
* @license http://www.opensource.org/licenses/gpl-3.0.html GNU GPL v3
*/
require_once 'models/function_core.php';
/**
* Function configuration
*
* Changes to this class may affect other classes.
*
* @see docs/function-configuration.txt
*/
class gmp_popcount extends function_core
{
public $examples = [
[
'number' => "10000101",
'base' => 2,
'$a',
],
[
'number' => "11111110",
'base' => 2,
'$a',
],
];
public $source_code = '
$_a = gmp_init(
$number, // mixed $number
$base // [int $base = 0]
);
inject_function_call
';
public $synopsis = 'int gmp_popcount ( resource $a )';
function pre_exec_function()
{
$number = $this->_filter->filter_arg_value('number');
$base = $this->_filter->filter_arg_value('base');
$this->returned_params['a'] = gmp_init($number, $base);
}
}
Powered by
PHP 7.1.33 (0.01 s)
2014-2017 Michel Corne