nerdexam
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)
  • A
    10% (4)
  • B
    5% (2)
  • C
    70% (28)
  • D
    15% (6)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice