Site icon Leonid Mamchenkov

Weird operators in PHP

Weird operators in PHP” covers a variety of awkward and weird operators in PHP.  I don’t think I’ll ever write any code using any of these.  But in case I come across any code in the future, that utilizes them, I should be sure to search back in the archives of this blog.  Here’s an example to get you started:

X-fighters

In case you want to add some firepower to the previous fleet, you can summon X-fighters to the PHP source : +-0-+. The following code adds 3 to $a.

$a = $a +-0-+ 3;
Exit mobile version