Web developments

Php and Javascript use the same syntaxe

In web development, it often happens that developers use both PHP and JAVASCRIPT. The reason for this is that these two languages ​​have identical syntaxes. To understand it, we will overcome here the differences and similarities between these two languages ​​of programming.

PHP and its "grammatical" rules

These are two languages ​​whose souls are different and the specialists of these programming languages ​​are not the same. PHP is a language inserted in HTML code in two tags such as or . PHP is therefore mixed with html for its functioning, this integration in a code made of php more than a programming language. In general, the syntax used by this language is the same as JAVA or C language. The rule is that the statements end with semicolons; And instruction blocks surround themselves with braces. While slashes // precede comments. As everyone knows, PHP is object-oriented, so it can be used integer variables, real or dual variables, and strings or strings with arrays and objects. In practice, when variables are enclosed in quotation marks, they are immediately replaced by their value.

Syntax with Javascript

Javascript follows a rule when programming. These rules are almost the same used for php programming. By definition, the statements in Javascript are called functions, they are separated by =. These functions are made up of values, operators, expressions, keywords and comments similar to those in the PHP language. Like PHP, Javascript is also run by the server in HTML codes. The variables used are identical to those used in programming with PHP. What differs the Java variables with PHP is that the Java variables are preceded by the acronym var whereas in PHP they are recognized by the symbol $. But their operation and the syntactic rules are identical for these two languages. Whether it's Javascript or PHP there are not really any differences.

Sumit Comment

About Web Development

  1. 30 Déc. 2016Ruby on Rails, also called RoR or Rails, is a free web framework written in Ruby85 hits
  2. 19 Déc. 2016Our company is recognized for these quality digital projects242 hits
  3. 25 Nov. 2016MavenPixel.com, best digital agency, what else?591 hits
  4. 01 Nov. 2016A single contact for your projects in Ruby: Rubysavvy.com652 hits
  5. 20 Oct. 2016Have a unique deisgn for his website makes the difference298 hits
  6. 29 Sept. 2016How to install Rail 5 ?630 hits
  7. 13 Sept. 2016Finding a new design for your website is always a challenge518 hits
  8. 24 Août 2016Magento website development682 hits
  9. 23 Août 2016Developing in PHP on Ubuntu197 hits
  10. 02 Janv. 2016Php development company, let the professional create your website10270 hits
  11. 17 Déc. 2015Do you need a php development for your blog ?1130 hits
  12. 09 Déc. 2015Which profession can help you to create a wonderful website ?983 hits
  13. 16 Nov. 2015Qualities of a top online web developers1896 hits
  14. 09 Nov. 2015What is a good web agency ??1168 hits
  15. 04 Oct. 2015Digital Publishing : You can try this tool for free !2710 hits