note 107253 modified in function.base-convert by danbrown

From: Date: Thu, 10 May 2012 21:34:03 +0000
Subject: note 107253 modified in function.base-convert by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187909@lists.php.net to get a copy of this message
For bigger numbers, base_convert() returns wired numbers, use some of the functions from the comments until it is fixed. 

Test your PHP version with the following code:

<?php
$code_1 = "F255I000000";
$binary_1 = base_convert($code_1, 31, 2);
echo "code 1: $code_1\\n";
echo "code 2: ".base_convert($binary_1, 2, 31);
?>

if code 1 and code 2 are the same, then everything is OK... --was-- For bigger numbers, base_convert() returns wired numbers, use some of the functions from the comments until it is fixed. Test your PHP version with the following code: $code_1 = "F255I000000"; $binary_1 = base_convert($code_1, 31, 2); echo "code 1: $code_1\n"; echo "code 2: ".base_convert($binary_1, 2, 31); if code 1 and code 2 are the same, then everything is OK... http://php.net/manual/en/function.base-convert.php

« previous php.notes (#187909) next »