0

What is difference between <> and != in PHP?

<?php
$a = 1;
$b = 2;
//this is true
if ($a <> $b) { echo "Yes!"; }
// also this is true
if ($a != $b) { echo "Yes!"; }

Thanks. :)

ma3x
  • 67
  • 9

1 Answers1

2

There is no difference, both operators serve exactly the same purpose.

arkascha
  • 39,439
  • 7
  • 52
  • 86