What will be the output of the following PHP code? <?php echo chr(52); ?>
1.1
2.2
3.3
4.4
What will be the output of the following PHP code? <?php echo lcfirst("welcome to India"); ?>
1.welcome to India
2.welcome to india
3.Welcome to India
4.Welcome to india
What will be the output of the following PHP code? <?php echo ord ("hi"); ?>
1.106
2.103
3.104
4.209
What will be the output of the following PHP code? <?php function calc($price, $tax="") { $total = $price + ($price * $tax); echo "$total"; } calc(42); ?>
1.Error
2.0
3.42
4.84
What will be the output of the following PHP code? <?php function foo($msg) { echo "$msg"; } $var1 = "foo"; $var1("will this wo
1.Error
2.$msg
3.0
4.Will this work
Which of the following are valid function names? i) function() ii) €() iii) .function() iv) $function()
1. Only i)
2.Only ii)
3.i) and ii)
4. iii) and iv)
Which of the following PHP functions accepts any number of parameters?
1.func_get_argv()
2. func_get_args()
3.get_argv()
4.get_argc()
A function in PHP which starts with __ (double underscore) is known as __________
1.Magic Function
2.Inbuilt Function
3. Default Function
4.User Defined Function
Type Hinting was introduced in which version of PHP?
1.PHP 4
2.PHP 5
3.PHP 5.3
4.6
What will be the output of the following PHP code? <?php $op2 = "blabla"; function foo($op1) { echo $op1; echo $op2; } foo("hello"); ?>
1. helloblabla
2.Error
3.hello
4.helloblablablabla
What will be the output of the following PHP code? <?php $str = "Hello World"; echo wordwrap($str,5,"<br> "); ?>
1.Hello World
2.Hello World
3.Hell o wo rld
4.world
What will be the output of the following PHP code? <?php echo ucwords("i love my country"); ?>
1. I love my country
2.i love my Country
3.I love my Country
4.I Love My Country
What will be the output of the following PHP code? <?php function a() { function b() { echo 'I am b'; } echo 'I am a'; } a(); a(); ?>
1. I am a
2.I am bI am a
3.Error
4.I am a Error
What will be the output of the following PHP code? <?php function a() { function b() { echo 'I am b'; } echo 'I am a'; } b(); a(); ?>
1.I am b
2.I am bI am a
3.Error
4. I am a Error
Which of the following PHP functions can be used for generating unique ids?
1. uniqueid()
2.id()
3.md5()
4.mdid()
Which one of the following functions can be used to compress a string?
1. zip_compress()
2.zip()
3.compress()
4.gzcompress()