Your expression analyzes people as follows.
An echo concatenated string consisting of:
- The result of a function
print('3')that returns true, which will be contracted to1 - String '2'
- The result of a function
print('4')that returns true, which will be contracted to1
Now the order of operations here is really funny, and it just can't end with 43211! Try the option to find out what is going wrong.
echo '1' . print('2') . '3' . print('4') . '5';
This gives 4523111
PHP parses this and then:
echo '1' . (print('2' . '3')) . (print('4' . '5'));
Bingo! First printleft evaluated, typing '45', which leaves us
echo '1' . (print('2' . '3')) . '1';
print, '4523',
echo '1' . '1' . '1';
. 4523111.
.
echo print('3') . '2' . print('4');
'4',
echo print('3' . '2' . '1');
, , '4321',
echo '1';
, 43211.
echo print, print echo. .
, , PHP . , .