开发者

Difference between PHP and PHP5 [closed]

开发者 https://www.devze.com 2022-12-17 01:43 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 8 years ago.

Improve this question

I want to study OOP-related PHP, mainly for mashups and some development. I started with PHP and MySQL.

What's the main relation or difference between PHP and PHP5. Is there anything different like PHP is for web development and the other PHP is for 开发者_如何学Gosoftware development?

Please guide me with some books with PHP OOP examples and concepts...


Note: I am assuming by 'PHP to PHP5' you mean from PHP4 to PHP5. PHP5 is not a different languages from PHP, it is simply a different version.


PHP4 to PHP5

Here is the main differences between PHP4 and PHP5.

http://www.php.net/manual/en/migration5.php

The specific OOP changes are featured in the Object Model

http://www.php.net/manual/en/migration5.oop.php

One of the places that page points that will give you the basics to how OOP works in PHP would be the Classes and Object reference page:

http://www.php.net/manual/en/language.oop5.php


PHP Class Examples

If you want some specific examples of how OOP is used in PHP, you might want to look at my answer on some basic classes you might use in a web development setting:

https://stackoverflow.com/questions/2035449/why-is-oop-hard-for-me/2035482#2035482


Learning PHP

To learn PHP, you can do a search on PHP and OOP on StackOverflow, and the first few results give you resources to do so:

https://stackoverflow.com/search?q=php+oop

If you want to skip clicking the link, you can just go to http://php.net, cause I guarentee that almost all of them point there. PHP has one of the best documentations out there, and it is extremely easy to use, and you will return to it very, very often.

For the record, the first result talks about how to learn object-oriented programming in php.


PHP is a language. PHP 5 is a specific version of the language implementation, as opposed to 3, 4, or 6.

There are lots of alternatives to PHP. Almost any language can be used for web development via CGI, although it's more common to use a framework such as Django or Rails.


PHP5 removed register_globals, magic quotes, and safe mode. This was due to the fact that register_globals had opened security holes by intentionally allowing runtime data injection and the use of magic quotes had an unpredictable nature.

0

精彩评论

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