1 reputation
1
bio website sdodev.com
location Tampa, FL
age 32
visits member for 2 years, 1 month
seen Aug 2 '12 at 2:04

im-a-little-teapot.php

<?php 
$whatami = $_SERVER['PHP_SELF'];   
$whatami = basename($whatami);      
$whatami = basename($whatami, '.php'); 
$im = str_replace("-", " ", $whatami);
function what_do_i_do($var, $poem) {
    if (strripos($var, "teapot")) { 
        return nl2br($mypoem = $poem . "when i get all worked up"); 
    }
}
$im != "im a little teapot" ? die : $mypoem = $im . "\n short and stout\n"; $teapot = "me";     
$container = array("handle", "spout");    
foreach ($container as $part) {       
    $mypoem = $mypoem . "here is my " . $part . "\n";   
}   
echo what_do_i_do($im, $mypoem);  
if (empty($error)) {      
    trigger_error("YOU BETTER WATCH OUT!", E_USER_WARNING);
    $mypoem = "TOOOOOOT! \n";    
} 
echo nl2br($mypoem . "tip " . $teapot . " over and pour " . $teapot . " out");  
?>