I am working on a new project for a company. They use Linux and I was thinking it may be the perfect opportunity to use Mono and C#. Right now they have tasked me with using PHP, which is a new language to me.
From what I have seen though, it is quite a bit like C# and Javascript. It is very simple to do some of the easy stuff and it is even an advanced enough language to have classes and inheritance.
A couple of things I have notice that are different in the syntax:
- All variables are named with “$” in front of them. ex. $vegetable
- Concatenation is accomplished with “.“. That means something else has to serve as the attribute link.
- The link for attributes, methods, and properties is “->“. ex. $vegetable->
- Classes refer to themselves with the keyword variable “$this” inside of the class.
- Most keywords (reserved words) use “$_“ in front of them. ex. “$_GET“ or “$_POST“
It is a language to appreciate. I believe it was made as an attempt to counter ASP and Microsoft by the advocates of open source, and they have quite a product now. In fact, as a caveat to Microsoft, there is a new tool by JCX.Software which is quite cheap at $99 and found here: VS.PHP Studio
Here is a screen shot:
|
| There is a 30 Day trial to decide if you like it or not. |