Isset Command in PHP

Let us have the following variable:

php<?php
  $test = null;
?>

Let's write a condition that checks that the variable is not equal to null:

php<?php
  $test = null;
  
  if ($test !== null) {
    echo '+++';
  } else {
    echo '---';
  }
?>

Such a check can be performed more conveniently using a special command isset:

php<?php
  $test = null;
  
  if (isset($test)) {
    echo '+++';
  } else {
    echo '---';
  }
?>

You can perform the reverse check, that the variable is not defined. To do this, we will perform inversion of isset using the logical NOT:

php<?php
  $test = null;
  
  if (!isset($test)) {
    echo '+++';
  } else {
    echo '---';
  }
?>
Задание 1

Modify the following code according to the studied theory:

php<?php
  $test = null;
    
  if ($test == null) {
    echo '+++';
  } else {
    echo '---';
  }
?>
Задание 2

Modify the following code according to the studied theory:

php<?php
  $test = null;
    
  if ($test != null) {
    echo '+++';
  } else {
    echo '---';
  }
?>