Logical Operators Without If in PHP Functions

Let's say we have a function with an if statement. Here it is:

php<?php
  function func($a, $b) {
    if ($a > $b) {
      return true;
    } else {
      return false;
    }
  }
?>

As you already know from previous lessons, if constructs that return boolean values can be rewritten in a shortened form.

Let's do this:

php<?php
  function func($a, $b) {
    return $a > $b;
  }
?>
Задание 1

Given the following function:

php<?php
  function func($a, $b) {
    if ($a === $b) {
      return true;
    } else {
      return false;
    }
  }
?>

Rewrite its code in a shortened form according to the studied theory.

Задание 2

Given the following function:

php<?php
  function func($a, $b) {
    if ($a !== $b) {
      return true;
    } else {
      return false;
    }
  }
?>

Rewrite its code in a shortened form according to the studied theory.

Задание 3

Given the following function:

php<?php
  function func($a, $b) {
    if ($a + $b >= 10) {
      return true;
    } else {
      return false;
    }
  }
?>

Rewrite its code in a shortened form according to the studied theory.

Задание 4

Given the following function:

php<?php
  function func($num) {
    if ($num >= 0) {
      return true;
    } else {
      return false;
    }
  }
?>

Rewrite its code in a shortened form according to the studied theory.