<html>
<head>
	<title>php testing area</title>
</head>
<body>

	<p>this is a <?php echo 'butt' ?> paragraph</p>
	<?php echo 'this is for php' ?>
	
	<?php
	$redToilet = "Peepee";
	echo $redToilet;
	?>

<?php
	// Scalar types
	// int defaults to 0
	// float defaults to 0
	// bool defaults to false
	// always manually write defaults
/*	$string = "PaPa";
	$int = 29542069;
	$float = 891.3;
	$bool = false;

	// empty string defaults to = "";
	$names;

	// Array type
	$names = ["PaPa", "Bella", "Frida"];
	
	// Object type
	// object defaults to null
	$object = new Car();*/

	// SUPERGLOBAL VARIABLES
	echo '<br>';
	echo '<br>';
	echo $_SERVER['DOCUMENT_ROOT'];
	echo '<br>';
	echo $_SERVER['SERVER_NAME'];
	echo '<br>';
	echo $_SERVER['REQUEST_METHOD'];
	echo '<br>';
	echo $_SERVER['REMOTE_ADDR'];
	echo '<br>';
	echo $_FILES[''];
	echo '<br>';
	echo $_COOKIE[''];
	echo '<br>';
	echo $_SESSION['username'] = "FEMIBUTT";
	echo '<br>';
	echo $_ENV[''];


// String operator
	$a = 'FUckin';
	$b = 'suckin';
	$c = $a . ' ' . $b;
	echo $c;
	echo '<br><br><br>';
// arithmetic operator
	echo (1 + 2) * 4;
	echo '<br>';

// Assignment operators
	$d = 2;
	$d += 4;
echo $d;

// comparison operator
$g = 9;
$h = "9";

$i = 2;
$j = 6;

if ($g < $h) {
	echo '9 is less than 9';
}

echo '<br><br><br>';

// || means or && means and
if ($g == $h || $i && $j) {
	echo '9 is 9 and 2 is not 6';
}

echo '<br><br><br>';

// Incrementing/decrementing operators
	$k = 9;
	echo ++$k;

echo '<br><br><br>';

	$l = 2;
	echo $l--;
	echo $l;	

echo '<br><br><br>';

$bool = true;
$m = 1;
$n = 4;

$result = match ($a) {
	1, 3, 5 => 'variable a is equal to one!',
	2 => 'variable a is equal to 2!',
};

/* if ($m < $n && !$bool) {
echo 'fist cond is true';
}

else if ($m < $n && !$bool) {
echo 'second condition is true';
}

// you can chain else if statements, they only run when the previous fails. if everything fails end it with an else statement

else {
echo 'none of the conds was true';
}

// GET is public, visible in url, POST is private, good for login page.

//switches

echo '<br><br><br>';

switch ($m) {
	case 1:
		echo 'the first case is correct, 1';
		break;
	case 3:
		echo 'the second case is correct, 3!';
		break;
	default:
		echo 'none were true, neither 1 nor 3';
		break;
}
 */


?>

</body>
</html>
