PHP Learners - Study24x7
Social learning Network
phplearners Cover image
phplearners
PHP Learners
  • Followers
  • Latest Feeds
  • Articles
  • Question
  • Course
  • About
  • Review
Interests
PHP
6 followers study24x7 11 Feb 2025 11:03 AM study24x7 study24x7

Which function is used to delay script execution in PHP?

A

pause()

B

wait()

C

sleep()

D

delay()

study24x7
Write a comment
6 followers study24x7 11 Feb 2025 11:03 AM study24x7 study24x7

Which function returns the length of a string in PHP?

A

strlen()

B

count()

C

size()

D

length()

study24x7
Write a comment
6 followers study24x7 10 Feb 2025 10:59 AM study24x7 study24x7

What does the explode() function do?

A

Joins array elements into a string

B

Splits a string into an array

C

Deletes a string

D

Compares two strings

study24x7
Write a comment
6 followers study24x7 10 Feb 2025 10:58 AM study24x7 study24x7

What does isset() check?

A

If a variable is set and not null

B

If a variable exists

C

If a variable is of a specific type

D

If a variable is true

study24x7
Write a comment
6 followers study24x7 10 Feb 2025 10:58 AM study24x7 study24x7

Which PHP function is used to generate a random number?

A

random()

B

rand()

C

random_int()

D

Both b and c

study24x7
Write a comment
6 followers study24x7 07 Feb 2025 10:21 AM study24x7 study24x7

Which hashing algorithm is recommended for storing passwords in PHP?

A

MD5

B

SHA-256

C

bcrypt

D

base64

study24x7
Write a comment
6 followers study24x7 07 Feb 2025 10:19 AM study24x7 study24x7

What does filter_var() do?

A

Sanitizes or validates data

B

Filters arrays

C

Converts data to JSON

D

Encodes URLs

study24x7
Write a comment
6 followers study24x7 07 Feb 2025 10:18 AM study24x7 study24x7

Which directive is used to protect PHP against SQL injection?

A

Use of prepared statements

B

Disabling magic_quotes

C

Enabling error_reporting

D

Using safe_mode

study24x7
Write a comment
6 followers study24x7 06 Feb 2025 11:38 AM study24x7 study24x7

What is the purpose of the strip_tags() function?

A

Removes whitespace

B

Removes HTML and PHP tags from a string

C

Removes slashes

D

Encodes special characters

study24x7
Write a comment
6 followers study24x7 06 Feb 2025 11:37 AM study24x7 study24x7

What does the addslashes() function do?

A

Removes slashes from a string

B

Escapes special characters in a string

C

Encrypts a string

D

Compresses a string

study24x7
Write a comment
6 followers study24x7 06 Feb 2025 11:36 AM study24x7 study24x7

Which function is used to start a session in PHP?

A

session_create()

B

start_session()

C

session_start()

D

begin_session()

study24x7
Write a comment
6 followers study24x7 05 Feb 2025 11:35 AM study24x7 study24x7

What is the default session duration in PHP?

A

10 minutes

B

30 minutes

C

Until the browser is closed

D

1 hour

study24x7
Write a comment
6 followers study24x7 05 Feb 2025 11:35 AM study24x7 study24x7

How do you set a cookie in PHP?

A

cookie_set()

B

set_cookie()

C

setcookie()

D

add_cookie()

study24x7
Write a comment
6 followers study24x7 05 Feb 2025 11:34 AM study24x7 study24x7

Which PHP function is used to redirect users to another page?

A

redirect()

B

header("Location: url");

C

change_url()

D

go_to()

study24x7
Write a comment
6 followers study24x7 04 Feb 2025 10:25 AM study24x7 study24x7

Which superglobal is used to access form data sent via the POST method?

A

$_REQUEST

B

$_POST

C

$_GET

D

$_FORM

study24x7
Write a comment
6 followers study24x7 04 Feb 2025 10:25 AM study24x7 study24x7

Which PHP framework uses the .env file for configuration?

A

Laravel

B

Symfony

C

CodeIgniter

D

Yii

study24x7
Write a comment
6 followers study24x7 04 Feb 2025 10:22 AM study24x7 study24x7

Which method is used to define routes in Symfony?

A

Router::route()

B

Route::define()

C

Annotations

D

All of the above

study24x7
Write a comment
6 followers study24x7 03 Feb 2025 10:53 AM study24x7 study24x7

Which command is used to start a Laravel server?

A

php artisan server

B

php artisan serve

C

php server start

D

artisan run

study24x7
Write a comment
6 followers study24x7 03 Feb 2025 10:52 AM study24x7 study24x7

What is the default templating engine for Laravel?

A

Twig

B

Blade

C

Smarty

D

Mustache

study24x7
Write a comment
6 followers study24x7 03 Feb 2025 10:49 AM study24x7 study24x7

Which PHP framework follows the MVC architecture?

A

Laravel

B

Symfony

C

CodeIgniter

D

All of the above

study24x7
Write a comment
Ratings
0.0
out of 5
0 Ratings
5 study24x7
 
0.0
4 study24x7
 
0.0
3 study24x7
 
0.0
2 study24x7
 
0.0
1 study24x7
 
0.0
Related Pages