I found this piece of code that I did not write:
$serverArray['msg'] = $data_log['AuthLog']['response_text'] = ($outputArray['transOutput']['outputCode'] == 1) ? $outputArray['transOutput']['msg'][0]['desc'] : $outputArray['transOutput']['errors'][0]['errorText'];
As you can see in the code about, the =
sign appears twice in the same line (ignoring ==
because that is clear to me what it means. In other words, I am trying to understand if the line of code is doing one of these two versions:
- $serverArray['msg'] = $data_log['AuthLog']['response_text'];
- $serverArray['msg'] = ($outputArray['transOutput']['outputCode'] == 1) ? $outputArray['transOutput']['msg'][0]['desc'] : $outputArray['transOutput']['errors'][0]['errorText'];
I guess what the code does is not simply limited to one of the two versions above because if that were the case, it would have been written exactly as one of the two versions above and it was not. So what is the usage of two =
signs in the same line of code? Thanks.