[ PHP Programming MCQS ]

झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।

[ PHP Programming MCQS ]

Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
431. PHP में filter_var() function का मुख्य उपयोग क्या है?
[A] Validation & Sanitization
[B] File Upload
[C] Session Destroy
[D] Database Backup
431. What is the main purpose of filter_var()?
[A] Validation & Sanitization
[B] File Upload
[C] Session Destroy
[D] Database Backup
सही उत्तर: Validation & Sanitization
व्याख्या: User input को validate और sanitize करने के लिए।
Correct Answer: Validation & Sanitization
Explanation: Used to validate and sanitize user input.
432. FILTER_VALIDATE_EMAIL का उपयोग किसलिए होता है?
[A] Email Validation
[B] Email Sending
[C] Email Encryption
[D] Email Storage
432. What is FILTER_VALIDATE_EMAIL used for?
[A] Email Validation
[B] Email Sending
[C] Email Encryption
[D] Email Storage
सही उत्तर: Email Validation
व्याख्या: Valid email format जांचता है।
Correct Answer: Email Validation
Explanation: Checks valid email format.
433. PHP में header("Location: page.php"); का उपयोग किसलिए होता है?
[A] Redirect User
[B] Create Session
[C] Delete Cookie
[D] Run Query
433. What is header("Location: page.php"); used for?
[A] Redirect User
[B] Create Session
[C] Delete Cookie
[D] Run Query
सही उत्तर: Redirect User
व्याख्या: User को दूसरे page पर भेजने के लिए।
Correct Answer: Redirect User
Explanation: Redirects the user to another page.
434. PHP Interview में सबसे अधिक पूछे जाने वाले security topics में कौन शामिल है?
[A] SQL Injection
[B] XSS
[C] CSRF
[D] सभी
434. Which of the following is among the most commonly asked PHP security topics?
[A] SQL Injection
[B] XSS
[C] CSRF
[D] All of these
सही उत्तर: सभी
व्याख्या: ये तीनों सबसे महत्वपूर्ण web security topics हैं।
Correct Answer: All of these
Explanation: These are the most important web security topics.
435. PHP Code: $a=10; $b=$a; $a=20; echo $b; Output क्या होगा?
[A] 10
[B] 20
[C] 30
[D] Error
435. PHP Code: $a=10; $b=$a; $a=20; echo $b; What is the output?
[A] 10
[B] 20
[C] 30
[D] Error
सही उत्तर: 10
व्याख्या: Value assignment में copy बनती है, reference नहीं।
Correct Answer: 10
Explanation: Value assignment creates a copy, not a reference.
436. PHP में current() function क्या return करता है?
[A] First Element
[B] Current Element
[C] Last Element
[D] Next Element
436. What does current() return in PHP?
[A] First Element
[B] Current Element
[C] Last Element
[D] Next Element
सही उत्तर: Current Element
व्याख्या: Array pointer जिस element पर है उसे return करता है।
Correct Answer: Current Element
Explanation: Returns the element at the current array pointer.
437. PHP में next() function का कार्य क्या है?
[A] Move Pointer Forward
[B] Move Pointer Backward
[C] Reset Pointer
[D] Delete Pointer
437. What does next() do in PHP?
[A] Move Pointer Forward
[B] Move Pointer Backward
[C] Reset Pointer
[D] Delete Pointer
सही उत्तर: Move Pointer Forward
व्याख्या: Array pointer अगले element पर ले जाता है।
Correct Answer: Move Pointer Forward
Explanation: Moves array pointer to next element.
438. PHP में prev() function का कार्य क्या है?
[A] Move Pointer Forward
[B] Move Pointer Backward
[C] Reset Pointer
[D] Delete Array
438. What does prev() do in PHP?
[A] Move Pointer Forward
[B] Move Pointer Backward
[C] Reset Pointer
[D] Delete Array
सही उत्तर: Move Pointer Backward
व्याख्या: Pointer को पिछले element पर ले जाता है।
Correct Answer: Move Pointer Backward
Explanation: Moves pointer to previous element.
439. PHP में reset() function क्या करता है?
[A] Pointer को पहले element पर ले जाता है
[B] Array delete करता है
[C] Array sort करता है
[D] Pointer हटाता है
439. What does reset() do in PHP?
[A] Moves pointer to first element
[B] Deletes array
[C] Sorts array
[D] Removes pointer
सही उत्तर: Pointer को पहले element पर ले जाता है
व्याख्या: Array pointer को शुरुआत में reset करता है।
Correct Answer: Moves pointer to first element
Explanation: Resets array pointer to beginning.
440. PHP Code: echo array_sum([10,20,30]); Output क्या होगा?
[A] 30
[B] 50
[C] 60
[D] 70
440. PHP Code: echo array_sum([10,20,30]); What is the output?
[A] 30
[B] 50
[C] 60
[D] 70
सही उत्तर: 60
व्याख्या: array_sum() array elements का total return करता है।
Correct Answer: 60
Explanation: Returns sum of array elements.