1. What is PHP?
PHP is the server-side scripting language used for a web server. PHP includes framework and CMM for creating many websites. Even a non-technical person can create a site using his CMS. Wordpress, OSCom is CMS it’s CMS. It's a temporarily based programming language like Java, C-arrays etc. It is very easy for learning
2. What is the use of PHP "echo"?
3. How to include a PHP page file?
We can include a file as "include ()" or "need ()" function as its file parameter.
4. How can I show output directly to the browser?
To be able to show the output directly to the browser, we have special tags <? = And?> to use.
5. What is the major difference between PHP 4 and PHP 5?
PHP 5 presents many additional OOP (object of infrared programming) features.
6. Multiple PHP Supported?
PHP has a particular inheritance; this means that a class can only be extended from the single class using the word ‘extended’.
7. What is the meaning of the final class and a final approach?
'Final' has been introduced in PHP 5. The final class means that this class cannot be extended and a final method cannot be ignored.
8. What is the comparison of objects in PHP 5?
We use the operator '==' to examine the two objects instanced from the same class and have the same attributes and equal value. Using the Identity Operator '===' we can examine if two objects are mentioned in the same example of the same object.
9. How can PHP and HTML interact?
It is possible to create HTML via a PHP script, and it is possible to collect PHP data from HTML.
10. What type of operation is required when passing the value through a form or a URL?
If we want to pass a form or a URL through value, then we need to decode them using encodes and htmlspecialchars () and urlencode ().
11. How can PHP and JavaScript communicate?
PHP and Javascript cannot directly interrelate since PHP is a server side language and Javascript is a client-side language. However, we can switch to variables after being able to generate JavaScript code for PHP browsers and it can change the reverse of PHP through certain variable URLs.
12. What is the need to be able to use the image function?
Need to run the image function to enable the GD library.
13. What is the use of the function 'fiction'?
Collective (image) formats and types are supported by the current version of GD-PHP.
14. What are the functions to get the image properties (size, width, and height)?
getimagesize() for size, imagesx() for width and imagesy() for height.
15. How the execution failures are executed () and () functions required?
If the function is not needed () cannot access the file then it will end with a fatal error. However, the included () function gives an alert and the PHP script continues to run.
16. What is the main difference between require () and require_once ()?
If the file is not available by requiring (), it will reason a fatal error and halt the execution of the script. If the file is not found by include (), a warning will be issued, but execution will continue.
17. require_once (), require (), include ().What is the difference between them?
Require () includes and evaluates a specific file, while require_once() does that only if it has not been included before (on the same page). require_once() is suggested to use when you want to include a file where you have a lot of functions for example. This way you make sure you don't include the file more times and you will not get the "function re-declared" error.
18. What Difference between getting and POST method?
Using the GET method we can send 1024 bytes, but a lot of information can be transferred to POST and POST is a safe method than the GET method.
19. What is the difference between sessions and cookies?
The main difference between sessions and cookies is that the sessions are stored on the server and the cookies are stored in the file format written on the user's computer. Cookies cannot hold multiple variables when a cookie can hold multiple variables. We can expire for a cookie; the session is only active until the browser is open. Users' Session does not have access to protected data since it is stored on the server. The session is mainly used for login/logout when the user is using cookies for tracking activity.
20. How can we retrieve information by setting the results of MySQL using PHP?
1. mysql_fetch_row
2. mysql_fetch_array
3. mysql_fetch_object
4. Mysql_fetch_assoc
21. What is the importance of an HTML form "method" attribute?
The "method" attribute determines how to send form data to the server. There are two methods, get and post. The default method is to get it. This form sends the information to the URL. The information sent from a form in the POST method is invisible to others and there is no limit to the amount of information to send.
22. What difference between mysql_connect and mysql_pconnect?
There is a good PHP manual for this topic, which is a permanent link to the MySQL_pconnect () database, which means that the SQL link will not stop when your script execution ends. Mysql_connect () mysql_pconnect is only available for database connection; the function will initially try to find the same (permanent) link which will be opened with the same host, username, and password already. If one is available, instead of opening a new connection, it will return an identifier ... the SQL Server connection will not be closed when the script execution is completed. Instead, the link will be open for future use.
23. What is the variation between $var and $$var?
They are both variables. But $ var is a variable with a specific name. $$ var is a variable that is stored in the name $ var. For example, if $ var is the "message", $$ var is the same as the $ message.
24. What are the different errors in PHP?
There are three types of runtime errors In PHP, they are:
Warning:
Examples of these important errors: When we try to include () the file that is not available. These errors are shown to users default but they will not end up in the script
Notice:
These flaws are found to be non-critical and trivial errors while running PHP scripts. Example: Attempts to gain access to variables that are not defined. These errors are not shown to users by default if the default behavior changes.
Fatal Error:
This is a serious error example: A class is important in an object which does not exist or is called an existent function. These errors end up scripts and show the default behavior of PHP when they run. Twelve different types of errors are used internally to represent these variations
25. Explain whether a Memcache in multiple PHP projects is possible to share a single example?
Yes, it is possible to share a single instance of emacs in multiple projects. Memcache is a memory store location, and you can run memcache on one or more servers. You can also configure your client to talk to a certain set of specifications. So, you can run two different memorabilia processes on the same host and they are still completely independent. Unless you have split your data, you need to know that information is available or installed from any information.
26. Can you update Memcached when you change PHP?
You can update Memcached by changing PHP
· Clearing cache security: Clear cache when inserted or updated
· Cash reset: It is similar to the first method but instead of waiting for the next request to delete the keys and refresh the cache, reset the value after insertion or update.
No comments:
Post a Comment