tasks a-s

This commit is contained in:
Ingy döt Net 2013-04-10 23:57:08 -07:00
parent 47bf37c096
commit b83f433714
12433 changed files with 156208 additions and 123 deletions

View file

@ -0,0 +1 @@
base_convert("26", 10, 16); // returns "1a"

View file

@ -0,0 +1 @@
intval("1a", 16); // returns 26

View file

@ -0,0 +1 @@
base_convert(26, 10, 16); // returns "1a"

View file

@ -0,0 +1,12 @@
// converts int to binary string
decbin(26); // returns "11010"
// converts int to octal string
decoct(26); // returns "32"
// converts int to hex string
dechex(26); // returns "1a"
// converts binary string to int
bindec("11010"); // returns 26
// converts octal string to int
octdec("32"); // returns 26
// converts hex string to int
hexdec("1a"); // returns 26