What is a static variable in php?
Answer / Sonam Tyagi
A static variable in PHP retains its value between function calls. It is declared using the keyword 'static'. Static variables are initialized only once, at the first call of the function they are defined in.
| Is This Answer Correct ? | 0 Yes | 0 No |
/temp is a type of filesystem directory. State Whether True or False?
What are the difference between abstract class and interface in oops?
What are the functions for imap?
Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would we validate whether the field is empty? Print a message "the email cannot be empty" in this case?
Is php still in demand?
Can you pass an array into a function?
How can we know the number of days between two given dates using PHP? How can we know the number of days between two given dates using MySQL?
Is multilevel inheritance possible in php?
Tell me how can we check the value of a given variable is alphanumeric?
What is the use of mvc in php?
Is php 7.0 stable?
How can I reset an array in PHP?
4 Answers Rushmore Consultancy, TCS,