PHP Questions

Q:

What’s the difference between accessing a class method via -> and via ::?

Answer :: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 3943
Q:

What's the difference between GET() and POST() method?

Answer

We can send 1024 bytes utilizing GET() yet POST() can exchange extensive measure of information and POST is the protected strategy than GET technique .

Report Error

View answer Workspace Report Error Discuss

Subject: PHP
Job Role: Database Administration

1 3939
Q:

Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?

Answer In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 3860
Q:

What's the difference between Session and Cookie?

Answer

The principle distinction amongst sessions and cookies is that sessions are put away on the server, and cookies are put away on the client's PCs in the content record position. Cookies can not hold various variables,But Session can hold numerous variables.We can set expiry for a cookie,The session just stays dynamic the length of the program is open.Users don't have admittance to the information you put away in Session,Since it is put away in the server. Session is mostly utilized for login/logout reason while cookies utilizing for client movement following.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP
Job Role: Database Administration

1 3822
Q:

What is the difference between the functions unlink and unset in PHP?

Answer

The function unlink() is to remove a file, where as unset() is used for destroying a variable that was declared earlier.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

1 3793
Q:

What is the difference between mysql_connect and mysql_pconnect?

Answer

There is a decent page in the php manual on the subject, in short mysql_pconnect() makes a persevering association with the database which implies a SQL join that don't close when the execution of your script closes. mysql_connect()provides just for the database new association while utilizing mysql_pconnect , the capacity would first attempt to locate a (relentless) connection that is as of now open with the same host, username and password. On the off chance that one is found, an identifier for it will be returned as opposed to opening another connection... the connection with the SQL server won't be terminated when the execution of the script ends. Rather, the link will stay open for future use.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP
Job Role: Database Administration

0 3768
Q:

What is the difference between _construct() and _destruct() methods in php?

Answer

These two methods are bulid-in methods  in php. with  construct() we can overwride the parent class method. The inverse of the __construct() PHP capacity while making another class, is the __destruct() technique. The __destruct() technique will consequently keep running, after you've completed with the PHP class.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP
Job Role: Software Architect

1 3665
Q:

What is PHP's mysqli Extension?

Answer

The mysqli extension , or as it is sometimes known, the MYSQL improved extension ,was developed to take advantage of new features found in MYSQL systems versions 4.1.3 and later.

The mysqli extension has a number of benfits,the key enhancements over the mysql extension being:
=> Object-oriented interface
=> Support for prepared statements
=> Support for multiple statements
=> Support for transactions
=> Enhanced debugging capabilities
=> Embedded server support

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 3608