News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

WebReference.com:
Unary, Binary, and Ternary Operators in PHP
June 27, 2007 @ 14:51:46

WebReference.com has a new tutorial that looks at the difference sorts of operators that PHP has to offer - unary, binary and ternary - to help you with the logic in your applications.

An operator is a special character or combination of characters that operates on variables. There are 3 types of operators in PHP: unary, binary and ternary. They can be used to manipulate a variable with up to 3 arguments at a time. This article wasn't written to discuss the meaning and usage of each operator in PHP, but rather to explain the differences between these types of operators and to give examples about how each functions.

They look at the different types of operators (and include examples for each) - unary (like ! or ++), binary (things like + / == and &&) and a special case - ternary. This uses two characters in conjunction (the question mark and colon) to replace a simple sort of If statement.

0 comments voice your opinion now!
operator binary unary ternary example tutorial operator binary unary ternary example tutorial


blog comments powered by Disqus

Similar Posts

DevShed: Displaying User Comments in a Code Igniter Blog Application

VG Tech Blog: Mocking the File System Using PHPUnit and vfsStream

Pierre-Alain Joye's Blog: Windows fixes release for Zip, fopen(,"rb") may not be binary safe

DevShed: Application Framework Components: Login/Logout

Ariz Jacinto's Blog: Compiling PHP with MSSQL Server's Native ODBC Driver for Linux as a PDO Driver


Community Events





Don't see your event here?
Let us know!


interview introduction package security version update tool language composer laravel voicesoftheelephpant release podcast install framework community symfony opinion series library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework