Home
last modified time | relevance | path

Searched refs:base_convert (Results 1 – 10 of 10) sorted by relevance

/PHP-8.1/ext/standard/tests/math/
H A Dbase_convert_variation2.phpt2 Test base_convert() function : strange literals
6 var_dump(base_convert('0b', 2, 10));
7 var_dump(base_convert('0B', 2, 10));
8 var_dump(base_convert('', 2, 10));
10 var_dump(base_convert('0o', 8, 10));
11 var_dump(base_convert('0O', 8, 10));
12 var_dump(base_convert('0', 8, 10));
13 var_dump(base_convert('', 8, 10));
15 var_dump(base_convert('0x', 16, 10));
16 var_dump(base_convert('0X', 16, 10));
[all …]
H A Dbase_convert_improvements.phpt5 echo base_convert('FF', 16, 10) . "\n";
6 echo base_convert('20', 8, 10) . "\n";
7 echo base_convert('0xFf', 16, 10) . "\n";
8 echo base_convert('0FF', 16, 10) . "\n";
12 echo base_convert("0o7" , 8, 10) . "\n";
18 echo base_convert('fg', 16, 10);
19 echo base_convert('f 0xff ', 16, 10);
20 echo base_convert('1xff ', 16, 10);
21 echo base_convert(chr(0), 16, 10);
22 echo base_convert("0o7" , 9, 10);
[all …]
H A Dbase_convert_error.phpt2 Test base_convert() function : error conditions - incorrect input
5 echo "*** Testing base_convert() : error conditions ***\n";
13 base_convert(1234, 1, 10);
18 base_convert(1234, 10, 37);
24 base_convert(new classA(), 8, 10);
31 *** Testing base_convert() : error conditions ***
32 base_convert(): Argument #2 ($from_base) must be between 2 and 36 (inclusive)
33 base_convert(): Argument #3 ($to_base) must be between 2 and 36 (inclusive)
34 base_convert(): Argument #1 ($num) must be of type string, classA given
H A Dbase_convert_variation3.phpt2 Test base_convert() function: converting '0'
6 var_dump(base_convert('0', 2, 10));
8 var_dump(base_convert('0', 8, 10));
10 var_dump(base_convert('0', 16, 10));
H A Dbase_convert_variation1.phpt2 Test base_convert() function : usage variations - different data types as $number argument
5 echo "*** Testing base_convert() : usage variations ***\n";
51 // loop through each element of $inputs to check the behaviour of base_convert()
56 var_dump(base_convert($input, 10, 8));
65 *** Testing base_convert() : usage variations ***
128 base_convert(): Argument #1 ($num) must be of type string, array given
146 base_convert(): Argument #1 ($num) must be of type string, resource given
H A Dbase_convert_basic.phpt2 Test base_convert() - basic function tests base_convert()
25 $res = base_convert($values[$i],$frombase[$f],$tobase[$t]);
/PHP-8.1/Zend/tests/
H A Dbug70124.phpt7 echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),$f("test"))],chr(48));
16 echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),a::y("test"))],chr(48));
24 … echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),$a->y("test"))],chr(48));
30 … echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),\bar\y("test"))],chr(48));
36 echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),y("test"))],chr(48));
/PHP-8.1/ext/standard/
H A Dmath.c974 PHP_FUNCTION(base_convert) in PHP_FUNCTION() argument
H A Dbasic_functions.stub.php1459 function base_convert(string $num, int $from_base, int $to_base): string {} function
H A Dbasic_functions_arginfo.h2698 ZEND_FUNCTION(base_convert);
3341 ZEND_FE(base_convert, arginfo_base_convert)

Completed in 31 milliseconds