What is Phalcon?
Phalcon is an open source, full-featured stack, PHP 5 framework written using C extensions and optimized for high performance. Developers do not need to learn and use the functions of C language, because all functions are exposed in the form of PHP classes and can be used directly. Phalcon is also loosely coupled, so you can use other objects as needed for your project.
The current stable version of Phalcon is 2.0. It supports PHP versions from 5.3 to 5.6 and does not support PHP7. 2.1.x is a beta version that supports PHP7. Therefore, if you want to use Phalcon for production environment, please use 5.6.
Installing Zephir
Phalcon2.1.x, which supports PHP7 version, does not support normal compilation and installation and can only be installed through zephir. Therefore, before installing phalcon, please install Zephire first. The installation method is as follows:
$zypper in re2c #Opensuse 安装zephir解释器 $git clone https://github.com/phalcon/zephir.git $cd zephir $./install -c #-c表示全局安装,需要root密码
Other versions of Linux can search and install re2c by themselves, and Mac can also install it through brew.
After the installation is completed, you can view the relevant command parameters and functions through the zephir command
Compile and install phalcon
Please confirm before compilingwhich php And which phpize points to the PHP7 version
The installation code is as follows:
git clone http://github.com/phalcon/cphalcon cd cphalcon git checkout 2.1.x zephir build --backend=ZendEngine3
After compilation is completed, extension=phalcon.so will be added to php.iniFile, restart php-fpm and nginx (I installed lnmp).
You can check whether the installation is successful through php -i|grep phalcon, or you can check through the web page output phpinfo()
Reference materials
zephir
#11635
Phalcon 2.1.0 RC1 released
Recommended tutorial: "php tutorial"
The above is the detailed content of How to install Phalcon framework for PHP7?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Linux new version
SublimeText3 Linux latest version

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor








