1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Files
archived-php-src/ext/standard/tests/math/base_convert_variation3.phpt
T
George Peter Banyard 589bdf30b2 Implement Explicit octal notation for integers RFC
RFC: https://wiki.php.net/rfc/explicit_octal_notation

Add an extensive test suits for other variants of integer literals

Closes GH-6360
2021-01-04 21:09:23 +01:00

19 lines
410 B
PHP

--TEST--
Test base_convert() function: converting '0'
--FILE--
<?php
echo 'Binary to decimal:', \PHP_EOL;
var_dump(base_convert('0', 2, 10));
echo 'Octal to decimal:', \PHP_EOL;
var_dump(base_convert('0', 8, 10));
echo 'Hexadecimal to decimal:', \PHP_EOL;
var_dump(base_convert('0', 16, 10));
?>
--EXPECT--
Binary to decimal:
string(1) "0"
Octal to decimal:
string(1) "0"
Hexadecimal to decimal:
string(1) "0"