开发者

Which are case sensitive among php/javascript/html?

I'm new to t开发者_运维知识库hese languages.


HTML is not case-sensitive (XHTML is, though).
PHP respects case in variable names, but not functions.
Javascript is case-sensitive.


PHP variable names are case sensitive, but the names of functions are case insensitive. Why is this?PHP is a language that's designed to let you write a web page template into which you can insert additional tags to call up the functionality of PHP, and it originated in the days before xhtml when tags were case insensitive. So it's natural for those additional tags to be case insensitive too.

JavaScript is Case Sensitive A function named "myfunction" is not the same as "myFunction" and a variable named "myVar" is not the same as "myvar".JavaScript is case sensitive - therefore watch your capitalization closely when you create or call variables, objects and functions

HTML As regards to tag and attribute names and most keyword-like attribute values, HTML is case insensitive. You can, for example, type TITLE or Title or title or even tItLE if you like.


Very roughly (as your question is a bit rough as well :): PHP is in variable names and constants, but nowhere else; javascript is completely (correct me if I'm wrong); HTML is not, however the recommended (and starting with XHTML 1.0, required) form for writing tags is lowercase.


One of these is not like the others... HTML is a markup language, as Wikipedia explains "A system for annotating text". Php and Javascript are programming languages. Programming languages "express computation". These constructs are very different, yet easy to cast into the same type because they are interwoven in a typical web application.

The other answers break down the differences, but just want to be clear there are two apples and one orange in your list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜