Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 

decbin

(PHP 3, PHP 4 , PHP 5)

decbin -- Da decimale a binario

Descrizione

string decbin ( int numero)

Restituisce una stringa contenente una rappresentazione binaria di un dato argomento numero. Il più grande numero che può essere convertito è 4294967295 in decimale, risultante in una stringa composta da 32 volte la cifra 1.

Esempio 1. Esempio per decbin()

<?php
echo decbin(12) . "\n";
echo
decbin(26);
?>

L'esempio precedente visualizzerà:

1100 
11010

Vedere anche bindec(), decoct(), dechex() e base_convert().

 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "Manuale PHP". See Index Page for more info about Authorship and Copyright.

1999-2009 Linuxinfor.com. No rights reserved.