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.ini
File, 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

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

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

Undress AI Tool
Undress images for free

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

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6
Visual web development tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment