Q:

PHP === and ? and : symbol meaning

This is an extract from a WebSocket client, what does the following code line mean/do ?
$frameHead[1] = ($masked === true) ? $payloadLength + 128 : $payloadLength;

I read it this way (check below)
If Masked == True Then $frameHeadHead[1] = $payloadLength + 128 / $payloadLength

I don't understand the ($masked === true) as well as I dont understand the : $payLoadLength; (what is the : symbol for ?)
And what if Masked == False ? There is no result ?

A:

That(?:) is called the ternary operator.
(condition) ? /* if condition is true then return this value */ 
            : /* if condition is false then return this value */ ;

Also === compares the internal object id of the objects. It is used for strict comparison. "===" means that they are identical. 
On a side note:

Note: Please note that the ternary operator is an expression, and that
  it doesn't evaluate to a variable, but to the result of an expression.
  This is important to know if you want to return a variable by
  reference. The statement return $var == 42 ? $a : $b; in a
  return-by-reference function will therefore not work and a warning is
  issued in later PHP versions.

A:

$frameHead[1] = ($masked === true) ? $payloadLength + 128 : $payloadLength;

it  conditional statement like if and else  

 if($masked === true){ $payloadLength + 128 } else {$payloadLength;}

A:

first: the === checks if both the value and the type equal (so while false==0 is true, false===0 isn't). the reverse would be !==.
the var=bool ? value1 : value2 statement is the same as:
if(bool){
  var=value1;
}else{
  var=value2;
}

so your line translates to:
if($masked===true){
  $frameHead[1] = $payloadLength + 128;
}else{
  $frameHead[1] = $payloadLength;
}

