[ PHP Programming MCQS ]
झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।
[ PHP Programming MCQS ]
Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
31. PHP में string length ज्ञात करने के लिए कौन-सा function प्रयोग होता है?
[A] count()
[B] strlen()
[C] size()
[D] length()
31. Which function returns string length?
[A] count()
[B] strlen()
[C] size()
[D] length()
सही उत्तर: strlen()
व्याख्या: String की लंबाई return करता है।
Correct Answer: strlen()
Explanation: Returns the length of a string.
32. PHP में string को lowercase में बदलने के लिए कौन-सा function प्रयोग होता है?
[A] lower()
[B] strlower()
[C] strtolower()
[D] tolower()
32. Which function converts a string to lowercase?
[A] lower()
[B] strlower()
[C] strtolower()
[D] tolower()
सही उत्तर: strtolower()
व्याख्या: String को lowercase में convert करता है।
Correct Answer: strtolower()
Explanation: Converts string to lowercase.
33. PHP में string को uppercase में बदलने के लिए कौन-सा function प्रयोग होता है?
[A] strtoupper()
[B] upper()
[C] strupper()
[D] toupper()
33. Which function converts a string to uppercase?
[A] strtoupper()
[B] upper()
[C] strupper()
[D] toupper()
सही उत्तर: strtoupper()
व्याख्या: String को uppercase में convert करता है।
Correct Answer: strtoupper()
Explanation: Converts string to uppercase.
34. PHP में array sort करने के लिए कौन-सा function प्रयोग होता है?
[A] sort()
[B] order()
[C] arrange()
[D] arraysort()
34. Which function sorts an array?
[A] sort()
[B] order()
[C] arrange()
[D] arraysort()
सही उत्तर: sort()
व्याख्या: Ascending order sorting।
Correct Answer: sort()
Explanation: Sorts array in ascending order.
35. PHP में descending order sort के लिए कौन-सा function प्रयोग होता है?
[A] dsort()
[B] arsort()
[C] desc()
[D] rsortarray()
35. Which function sorts array values in descending order?
[A] dsort()
[B] arsort()
[C] desc()
[D] rsortarray()
सही उत्तर: arsort()
व्याख्या: Array values descending order में sort करता है।
Correct Answer: arsort()
Explanation: Sorts array values in descending order.
36. PHP में associative array sort करने के लिए कौन-सा function प्रयोग होता है?
[A] asort()
[B] sort()
[C] ksort()
[D] Both asort() and ksort()
36. Which function is used to sort associative arrays?
[A] asort()
[B] sort()
[C] ksort()
[D] Both asort() and ksort()
सही उत्तर: Both asort() and ksort()
व्याख्या: asort values और ksort keys को sort करता है।
Correct Answer: Both asort() and ksort()
Explanation: asort sorts values and ksort sorts keys.
37. PHP में array के अंतिम element को निकालने के लिए कौन-सा function प्रयोग होता है?
[A] array_pop()
[B] array_shift()
[C] pop()
[D] remove()
37. Which function removes the last element of an array?
[A] array_pop()
[B] array_shift()
[C] pop()
[D] remove()
सही उत्तर: array_pop()
व्याख्या: Last element remove करता है।
Correct Answer: array_pop()
Explanation: Removes the last array element.
38. PHP में array के पहले element को निकालने के लिए कौन-सा function प्रयोग होता है?
[A] array_pop()
[B] array_shift()
[C] array_first()
[D] remove_first()
38. Which function removes the first element of an array?
[A] array_pop()
[B] array_shift()
[C] array_first()
[D] remove_first()
सही उत्तर: array_shift()
व्याख्या: First element remove करता है।
Correct Answer: array_shift()
Explanation: Removes the first element.
39. PHP में array में element जोड़ने के लिए कौन-सा function प्रयोग होता है?
[A] array_push()
[B] array_add()
[C] insert()
[D] push()
39. Which function adds an element to an array?
[A] array_push()
[B] array_add()
[C] insert()
[D] push()
सही उत्तर: array_push()
व्याख्या: Array के अंत में element जोड़ता है।
Correct Answer: array_push()
Explanation: Adds element to the end of array.
40. PHP में function बनाने के लिए कौन-सा keyword प्रयोग होता है?
[A] method
[B] func
[C] function
[D] define
40. Which keyword is used to define a function?
[A] method
[B] func
[C] function
[D] define
सही उत्तर: function
व्याख्या: User-defined function के लिए।
Correct Answer: function
Explanation: Used to define user functions.