Tuesday, April 22, 2008

Some interesting Bugs in php

<?
if(isset($_REQUEST['submit']))
echo "<pre>";
print_r($_POST);
echo "</pre>"

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form method="POST">
<input type="hidden" name="test.one" value="1" />
<input type="hidden" name="test#two" value="2" />
<input type="submit" name="submit Me" value="Click me" />
</form>

</body>
</html>

<?
echo date('Y-m-d', strtotime('first monday jan 2007'));
echo "<br>";

echo date('Y-m-d', strtotime('first monday feb 2007')); 
echo "<br>";

echo date('Y-m-d', strtotime('first thursday feb 2007'));
echo "<br>";

echo date('Y-m-d', strtotime('first thursday jan 2007'));
echo "<br>";
?>

<?
preg_match('/(.{0,20})$/us', " ", $m);
var_export($m);
?>

<?
for ($char="A";$char<="Z";$char++)
{
echo "$char - ";
}
?>

<?
$test = "X\\X?asdasdasd\\asdasd.*";

echo $tt=preg_quote($test);
//echo preg_match("/X\\X/", $tt)."\n";
?>

1 comment:

Anonymous said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Wireless, I hope you enjoy. The address is http://wireless-brasil.blogspot.com. A hug.

Post a Comment