All pastes #339684 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-02-04 07:13 UTC
rendered paste body
class Insult {
var $style = array();
var $group = "";
var $choice = "";
var $insult = "";
    var $sub_group0 = array("Your parents are", "Your brother is", "Your sister is", ...);
    var $sub_group1 = array("the louiest", "the lamest", "the sickest", ...);
var $group0 = array($sub_group0, $sub_group1, ...);
var $styles = array($group0, $group1, ...);
	
    __construct($Style, $Group, $Choice)
    {
        $this->insult = $this->styles[($Style - 1)][($Groups - 1)][($Choice - 1)];
        echo "New Insult Created: " . $this->insult . "\n";
    }
	
    function Out()
    {
        echo $this->insult;
    }
	
}

$iInsult = new Insult(0,1,1); // This would create an instance of the 'Insult' class. Also, it will echo "Your parents are\n" on creation.
$iInsult::Out(); // This would echo "Your parents are\n".
$iInsult2 = new Insult(0,rand(1,3),rand(1,3)); // Syntax: <variable> = new Insult(int Style, rand(int min, int max), rand(int min, int max));