Logical OR in PHP

Logical OR requires the fulfillment of at least one condition. In the following example, the condition will be met if the variable $num1 is greater than 0 or the variable $num2 is greater than 0 (it is sufficient to fulfill at least one of the conditions):

php<?php
  $num1 = 10;
  $num2 = -5;
  
  if ($num1 > 0 or $num2 > 0) {
    echo '+++'; // this will work
  } else {
    echo '---';
  }
?>
Задание 1

Without running the code, determine what will be displayed on the screen:

php<?php
  $num1 = -10;
  $num2 = -10;
  
  if ($num1 >= 0 or $num2 >= 0) {
    echo '+++';
  } else {
    echo '---';
  }
?>
Задание 2

Without running the code, determine what will be displayed on the screen:

php<?php
  $num1 = 0;
  $num2 = 0;
  
  if ($num1 >= 0 or $num2 >= 0) {
    echo '+++';
  } else {
    echo '---';
  }
?>
Задание 3

Without running the code, determine what will be displayed on the screen:

php<?php
  $num1 = 0;
  $num2 = 5;
  
  if ($num1 >= 0 or $num2 >= 0) {
    echo '+++';
  } else {
    echo '---';
  }
?>
Задание 4

Without running the code, determine what will be displayed on the screen:

php<?php
  $num1 = 5;
  $num2 = 5;
  
  if ($num1 >= 0 or $num2 >= 0) {
    echo '+++';
  } else {
    echo '---';
  }
?>
Задание 5

Without running the code, determine what will be displayed on the screen:

php<?php
  $num1 = -5;
  $num2 = 15;
  
  if ($num1 >= 0 or $num2 >= 0) {
    echo '+++';
  } else {
    echo '---';
  }
?>
Задание 6

Without running the code, determine what will be displayed on the screen:

php<?php
  $num = 1;
  
  if ($num == 0 or $num == 1) {
    echo '+++';
  } else {
    echo '---';
  }
?>
Задание 7

Without running the code, determine what will be displayed on the screen:

php<?php
  $num = 2;
  
  if ($num == 0 or $num == 1) {
    echo '+++';
  } else {
    echo '---';
  }
?>
Задание 8

Without running the code, determine what will be displayed on the screen:

php<?php
  $num = 2;
  
  if ($num == 0 or $num == 1 or $num == 2) {
    echo '+++';
  } else {
    echo '---';
  }
?>