PHP Technical Question
-
Upload
pankaj-kumar-jha -
Category
Documents
-
view
477 -
download
2
description
Transcript of PHP Technical Question
![Page 1: PHP Technical Question](https://reader035.fdocuments.net/reader035/viewer/2022071700/55cf98de550346d0339a2430/html5/thumbnails/1.jpg)
W: www.globalcodester.com E: [email protected]
PH
P T
ec
hn
ic
al Q
ue
stio
ns
1. Write a program of factorials in php?
2. In which statement output is assigned to a string rather than output directly to
standard output?
a) Strecho()
b) String()
c) Seco()
d) Sprint()
3. Which function Returns the time at which the file was last changed as a UNIX
timestamp?
a) fileatime()
b) filectime()
c) filemtime()
d) fileitime()
4. Which is a line placed at the top of the script itself that tells the computer where to
find the PHP engine?
a) Data
b) Bin
c) Shebang
d) None of the above
5. Which is used for reading user input?
a) Echo
b) Strerr
c) Stdin
d) STDIN
6. PHP supports an alternative to the C++-style single-line syntax, known as ______?
a) Short circuit
b) Java syntax
c) Native syntax
d) Shell syntax
![Page 2: PHP Technical Question](https://reader035.fdocuments.net/reader035/viewer/2022071700/55cf98de550346d0339a2430/html5/thumbnails/2.jpg)
W: www.globalcodester.com E: [email protected]
PH
P T
ec
hn
ic
al Q
ue
stio
ns
7. Which support offered users the ability to use PHP in conjunction with Microsoft’s IIS
Web server as an ISAPI module?
a) COM/DOM
b) ISAPI
c) Encryption
d) Java
8. Which serves as the lookup facility for retrieving its counterpart?
a) Value
b) Key
c) Boolean
d) None of the above
9. How can we check the value of a given variable is alphanumeric?
a) ctype_alnum()
b) ctype_alphanumeric()
c) alnum()
d) alphanumeric()
10. What is the value of $a ?
$a .= "a";
$a .= "b";
$a .= "c";
11. What is the value of $c ?
$a = 4;
for ($b = 0; $b <= $a; $b++) { $c++; }
12. What is the value of $a[2] ?
$a[] = "a";
$a[] = "b";
$a[] = "c";
![Page 3: PHP Technical Question](https://reader035.fdocuments.net/reader035/viewer/2022071700/55cf98de550346d0339a2430/html5/thumbnails/3.jpg)
W: www.globalcodester.com E: [email protected]
PH
P T
ec
hn
ic
al Q
ue
stio
ns
13. Which of the above variable's type is integer?
$a = 200.5;
$b = 2005;
$c = "2005";
14. What is the value of $a ?
$a = '1';
$b = &$a;
$b = "2$a";
15. What is the value of $b ?
$a = "abc";
$b = substr($a, 0, -1);
16. Which of the above variable's type is string?
$a = true;
$b = "true";
$c[] = "true";
17. What is the value of ${$b} ?
$a = "b";
$b = "a";
18. What is the value of $c ?
$a = array ("a","b","c");
foreach ($a as $b){ $c++; }
19. What is the value of $d ?
$a = "0";
$b = "0";
if ($a != "1" && $b == "1" || $a != "0" || $b != "1" ){ $d = "0"; }
else{ $d = "1"; }
![Page 4: PHP Technical Question](https://reader035.fdocuments.net/reader035/viewer/2022071700/55cf98de550346d0339a2430/html5/thumbnails/4.jpg)
W: www.globalcodester.com E: [email protected]
PH
P T
ec
hn
ic
al Q
ue
stio
ns
20. What is the value of $d ?
$a = "post_processed_string";
$b = array("post_", "_");
$c = array("", " ");
$d = ucwords(str_replace($b,$c,$a));
21. What is the value of $b[1] ?
$a = "<tt>some</tt><b>html</b>";
preg_match("/<\w?>(\w*?)<\/\w?>/",$a,$b);