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,7 @@
<?php
echo +"0123459", "\n"; // prints 123459
echo intval("0123459"), "\n"; // prints 123459
echo hexdec("abcf123"), "\n"; // prints 180154659
echo octdec("7651"), "\n"; // prints 4009
echo bindec("101011001"), "\n"; // prints 345
?>

View file

@ -0,0 +1,5 @@
<?php
echo intval("123459", 0), "\n"; // prints 123459
echo intval("0xabcf123", 0), "\n"; // prints 180154659
echo intval("07651", 0), "\n"; // prints 4009
?>

View file

@ -0,0 +1,5 @@
<?php
echo +"0xabcf123", "\n"; // prints 180154659
# This does not work for octals, however:
echo +"07651", "\n"; // prints 7651
?>