Search Header Logo
 Php basic

Php basic

Assessment

Presentation

Computers

University

Practice Problem

Hard

Created by

Dr. Rahman

Used 19+ times

FREE Resource

1 Slide • 15 Questions

1

media




PHP

2

Multiple Select

what is php?

1

a front end development language

2

a back end development language

3

a server side language

4

a language to style the front end

3

Multiple Choice

A php file can contain-

1

only php code

2

both php and html

3

php, html and css

4

php, html, css and javascript

4

Multiple Choice

How a php code start and end?

1

<?

php?>

2

<?

<?

3

<?php

?php>

4

<?php

?>

5

Multiple Choice

In the code, a php statement ends with-

1

;

2

:

3

newline

4

//

6

Multiple Choice

How a php variable starts with-

1

&

2

*

3

$

4

#

7

Multiple Select

Which php variables are correct?

1

$9x

2

$x9

3

$99

4

$_x9

8

Multiple Select

How to get output in php?

1

echo

2

print()

3

print

4

printf

9

Multiple Choice

What will be the output?

$x = "class of php";

echo substr($x, 3);

1

ss of php

2

s of php

3

php

4

class of

10

Multiple Choice

What will be the output?

$x = "wonderful world";

echo substr($x, -8, 5);

1

l worl

2

derul wor

3

ul world

4

ul wo

11

Multiple Choice

What will be the output?

$x = "Hello, Excuse me?";

echo substr($x, 4, -4);

1

, Excuse m

2

lo, Excus

3

o, Excuse

4

o, Excuse m

12

Multiple Choice

What will be the output?

$x = "!!!what is your name???";

echo substr($x, 1, -10);

1

!!what is

2

!!what is yo

3

!!!what is

4

is your n

13

Multiple Choice

Why 'break' statement is used?

1

to enter a new loop

2

to jump out from a loop

3

to change a function

4

to restart a loop

14

Multiple Choice

why 'continue' statement is used?

1

to stop current iteration of a loop

2

to stop the whole loop

3

to restart a loop

4

to end a loop

15

Multiple Choice

A user defined function starts with-

1

'myfunction' keyword

2

'function'

keyword

3

'newfunction' keyword

4

'thefunction '

keyword

16

Multiple Choice

select the right statements?

1

we can use php to connect front end with database

2

we can connect database but cant modify database using php

3

database table names cant be changed using php

4

we can modify and change the database with php

media




PHP

Show answer

Auto Play

Slide 1 / 16

SLIDE