Zend
200-530 · Question #165
What is the output of the following code? str_pad('PHP', 10, 'P', STR_PAD_BOTH);
The correct answer is C. PPPPHPPPPP. See the full explanation below for the reasoning.
Question
What is the output of the following code? str_pad('PHP', 10, 'P', STR_PAD_BOTH);
Options
- AH
- BPHPPPPPPPP
- CPPPPHPPPPP
- DPPPPPPPPHP
How the community answered
(40 responses)- A10% (4)
- B5% (2)
- C70% (28)
- D15% (6)
Community Discussion
No community discussion yet for this question.