05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ase64_decode<br />

string base64_decode(string data)<br />

Decodes data, which is base 64–encoded data, into a string (which may contain binary<br />

data). For more information on base-64 encoding, see RFC 2045.<br />

base64_encode<br />

string base64_encode(string data)<br />

Returns a base 64–encoded version of data. MIME base-64 encoding is designed to allow<br />

binary or other 8-bit data to survive transition through protocols that may not be 8-bit safe,<br />

such as email messages.<br />

base_convert<br />

string base_convert(string number, int from, int to)<br />

Converts number from one base to another. The base the number is currently in is from, and<br />

the base to convert to is to. The bases to convert from and to must be between 2 and 36.<br />

Digits in a base higher than 10 are represented with the letters a (10) through z (35). Up to<br />

a 32-bit number, or 2,147,483,647 decimal, can be converted.<br />

basename<br />

string basename(string path[, string suffix])<br />

Returns the filename component from the full path path. If the file’s name ends in suffix,<br />

that string is removed from the name. For example:<br />

$path = "/usr/local/httpd/index.html";<br />

echo(basename($path)); // index.html<br />

echo(basename($path, '.html')); // index<br />

bin2hex<br />

string bin2hex(string binary)<br />

Converts binary to a hexadecimal (base-16) value. Up to a 32-bit number, or<br />

2,147,483,647 decimal, can be converted.<br />

bindec<br />

int bindec(string binary)<br />

Converts binary to a decimal value. Up to a 32-bit number, or 2,147,483,647 decimal, can<br />

be converted.<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.<br />

bindec | 385

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!