Skip to content

Commit

Permalink
added operators
Browse files Browse the repository at this point in the history
  • Loading branch information
gsingh0101 authored Feb 28, 2024
1 parent 037dbe2 commit 8fd9b48
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions php-concepts/typehinting.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,20 @@ function jointhings_using_uniontypes(string|int $a, float $b): string {
echowitheol($a);
$a = jointhings_using_uniontypes(1.1, 1.1);
echowitheol($a);


// understand the === vs == operator
if ("1" === 1) {
echo 'these are identical <br/>';
} else {
echo 'these are NOT identical <br/>';
}


// understand the == operator
if ("1" == 1) {
echo 'these are equal <br/>';
} else {
echo 'these are NOT equal <br/>';
}

0 comments on commit 8fd9b48

Please sign in to comment.