On the difference between php and. net

  • 2021-07-21 07:37:49
  • OfStack

I recently changed from asp. net to php, the main direction is Web development, feeling that there are still many differences between the two.

1. Compared with. net, php is more inclined to interpretive language type;

2. In. net, we mainly operate on encapsulated object-class libraries; In php, the objects we mainly operate on are mainly various functions;

3. The programming tools of 3. php are relative to. The programming environment and database of net are very, very lightweight; Especially the programming environment, which is both lightweight and flexible;

4. In. net and php, the data transmission modes are get and post (the third one is not discussed for the time being); In. net, we use context. Request ["ID of Operating Objects"], context. QueryString ["ID of Operating Objects"] to obtain data; In php, we use $_ get ["ID of Operation Object"], $_ post ["ID of Operation Object"] to obtain data.

5. In. net, the way to display data is Response. Write ("What you want to display"); In php, we use echo "what you want to display";

6. In. net, we mainly operate on objects and arrays, which can be transformed into each other; In. net, the objects we operate on are mainly arrays.

Related articles: