PHP Path recommended PHP version, database method, and virtual machine creation program

Source: Internet
Author: User
Tags learn php

PHP Way: http://wulijun.github.io/php-the-right-way/using the current stable version (5.5)

If you are just starting to learn PHP, use the latest stable version of PHP 5.5. PHP has been greatly improved in recent years, adding a lot of powerful new features. Don't let the low-version PHP 5.2 Bug mislead You, these new features are important improvements to the old version. If you want to find a function and its usage, you can go to the official PHP manual php.net find.

Database

Typically, PHP code uses a database to persist data, and there are several ways to connect and manipulate the database. Before _php 5.1.0_, the recommended methods are MySQL, Mysqli and Pgsql.

If the application just uses a database, the native driver works very well, otherwise using MySQL, but also need to use the MSSQL or Oracle database, then there is no way to use only a native driver, only to learn the individual database-driven API, which is very annoying.

It is also important to note that MySQL, the native driver, is no longer active and is marked as deprecated from php 5.4.0, meaning that future versions such as PHP 5.6 may remove this extension. If you're using mysql_connect () and mysql_query (), you might want to rewrite some of the code in the future, so it's best to use mysqli or PDO instead. If you are developing a new project, please do not use the MySQL extension, try to replace it with mysqli extension or PDO

PHP: Select MySQL API

Vagrant "Virtual Machine creation program"

If you're using a different environment when you're developing apps and publishing apps, there are a number of strange bugs that can happen to your app when you're officially using it. If you are working in a development team, it will be more cumbersome to ensure that your development environment and all library files are up-to-date and in the same version. If you are developing and preparing to deploy to Linux (or other non-Windows platforms) on the Windows platform, or if you are working in a development team, you should consider using a virtual machine. This may sound like a hassle, but the Vagrant program can help you create a simple virtual machine in a few steps. Next, you can manually configure these basic environments, or you can find a deployment software to do these things for you, such as Puppet or chef. Deploying a basic environment is a good way to ensure that your development environment is built in a similar manner, and it saves you the hassle of maintaining those complex "install commands" lists. You can also easily destroy the existing infrastructure and make a new one so you can have a whole new environment.

Vagrant creates some shared folders that you can use to share code between the host and the virtual machine. That is, you can write programs on the host and then run them in the virtual machine.

PHP Path recommended PHP version, database method, and virtual machine creation program

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.