Why does "print" prints from right to left?

php

Solution

I believe this occurs because the dot operator is left-associative.

The expression would look like this with parenthesis:

print 5 . (print 6 . (print 7));

Problem

Can anyone please explain to me how this works: ``` <?php print 5 . print 6 . print 7; ?> ``` it prints: `76151` I know the `1` is the return value from the `print` function, but why are the functions called in reverse order?

Original source