Welcome to vulnerability testing! Powered by PHP!

18) { echo "Adult"; } elseif ($age > 12) { echo "Teenager"; } else { echo "Child"; } echo nl2br("\n\n"); switch($day) { case "Monday": echo "Start of week"; break; case "Friday": echo "End of week"; break; default: echo "Mid-week"; } echo nl2br("\n\n"); for ($i = 0; $i < 5; $i++) { echo $i; } echo nl2br("\n\n"); $fruits = ["apple", "banana", "orange"]; foreach($fruits as $fruit) { echo $fruit; } echo nl2br("\n\n"); foreach($fruits as $index => $fruit) { echo "$index: $fruit"; } echo nl2br("\n\n"); $i = 0; while ($i < 5) { echo $i++; } echo nl2br("\n\n"); ?> name = $name; $this->age = $age; } public function greet() { return "Hello, my name is {$this->name} and I'm {$this->age} years old."; } public function getAge() { return $this->age; } } $person = new Person("John", 30); echo $person->greet(); echo $person->getAge(); echo nl2br("\n\n"); ?> "John", "age" => 30, "city" => "NewYork" ]; echo $person["name"]; echo nl2br("\n"); $users = [ ["name" => "John", "age" => 30], ["name" => "Mary", "age" => 25], ]; echo $users[1]["name"]; echo nl2br("\n"); $fruits[] = "grape"; // add item to the end $person["job"] = "developer"; // add new K-V pair $count = count($fruits); $exists = in_array("apple", $fruits); sort($fruits); $keys = array_keys($person); $values = array_values($person); echo nl2br("\n\n"); ?>