I am new to Laravel framework(i.e a framework driven from Symfony library) .I was looking at the code of Symfony and came across some short cuts that i think i can use to improve my ability to code neatly.
I want to know about the behavior of these operators? ( ?: etc)
1- $this->history = $history ?: new History();
//Does this mean create object of History class and store in $this->history?
2- $this->maxRedirects = $maxRedirects < 0 ? -1 : $maxRedirects;
3- $this->followRedirects = -1 != $this->maxRedirects;
//Not sure how operators are behaving?i know this is something to do with regex but want to know the logic.
I would appreciate if somebody could post a link of tutorial about regex programming in php like above.