Posted by hariharasuthan_mk on February 18, 2011 at 5:47pm
- Which of the following snippets prints a representation of 10 with two decimal places?
- A.
- printf("%.2d\n", 10);
- B.
- printf("%1.2f\n", 10);
- C.
- printf("%1.2u\n",10);
- Given $text = 'Content-Type: text/xml'; Which of the following prints 'text/xml'?
- A.
- print substr($text, strchr($text, ':'));
- B.
- print substr($text, strchr($text, ':') + 1);
- C.
- print substr($text, strpos($text, ':') + 1);
- D.
- print substr($text, strpos($text, ':') + 2);
- E.
- print substr($text, 0, strchr($text, ':'
- What does <? echo count ("143") ?> print out?
- A.
- 3
- B.
- False
- C.
- Null
- D.
- 1
- E.
- 0
- What is the value of $a?
<?php
$a = 100 == 0100;
?> - A.
- True
- B.
- False
- What will be the output of the following PHP code:
<?php
echo count(strlen("http://drupal.org"));
?>
