php

Diff b/w JAVA & PHP :

1. In PHP, there is no method overloading, but methods and functions can have optional parameters.

2. PHP code largely embed with HTML document. Much like JSP.

3. Method overriding and overloading is quite natural in Java but a bit of a kludge in PHP

4. PHP object method calls use the -> operator. Java uses the . operator

5. PHP offers OOP (object oriented programming) as an option that is ignored in most projects. In, Java, OOP is the default.

6. Java is compiled to bytecode, PHP is interpreted.

7. PHP requires an explicit $this be used when an object calls its own methods. Java does not.

8. Java Class library provides a mechanism to implement threads. PHP has no such mechanism.

9. Class names in Java are case sensitive. Strings are not mutable in Java. All method parameters are passed by value in Java.

Types of Errors :

1. Parse or syntax error. –> while syntax error. It will stop execution. unclosed quotes, missing or extra parenthesis, Unclosed braces, Missing Semicolon.

2. fatal error —> It stop the script execution. If you trying to access undefined function. It will show fatal error.

3. Notice error –> It same as warning error. It will occur while trying to access undefined variable.

4. Warning error –> It will not stop execution. Warning error occur due to incorrect number of parameters to function and include file missing.

mysql_connect —> we can close the connection by using mysql_close(). It will close connection automatically.

mysql_pconnect –> we are not able to close connection. If you trying to close the connection connection will override.

Posted in php
One comment on “php
  1. Free Piano says:

    Free Piano

    Hello 🙂 Your method of describing the whole thing in this paragraph is genuinely fastidious, every one be able to simply be aware of it, Thanks a lot.

Leave a comment