dfego Posted April 18, 2007 Share Posted April 18, 2007 Hi, I've been recently given some code to edit, and I've encountered an operator I've not encountered before. I can best describe it as the "diamond operator" and it looks like this: <>. Unfortunately, a search engine doesn't help much, since "<>" doesn't really search for anything. Its usage is like: if ($myvar <> "test") Does anyone have any idea what this is? The only references I could find about any "diamond operator" were to Perl. Link to comment https://forums.phpfreaks.com/topic/47526-diamond-operator/ Share on other sites More sharing options...
Jove Posted April 18, 2007 Share Posted April 18, 2007 if($myvar != "test") Link to comment https://forums.phpfreaks.com/topic/47526-diamond-operator/#findComment-231994 Share on other sites More sharing options...
dfego Posted April 18, 2007 Author Share Posted April 18, 2007 Wow, really? Do you know if it's deprecated or something? It's not even on the operators page of the PHP manual: http://www.php.net/manual/en/language.operators.php Link to comment https://forums.phpfreaks.com/topic/47526-diamond-operator/#findComment-231997 Share on other sites More sharing options...
Jove Posted April 18, 2007 Share Posted April 18, 2007 I just know it from languages like QBasic. I've never seen something like this in a PHP script Link to comment https://forums.phpfreaks.com/topic/47526-diamond-operator/#findComment-231999 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.