PHP is a common open source scripting language. The syntax absorbs the features of C, Java, and Perl, which is easy to learn and widely used. it is mainly applicable to the Web development field and is the first choice for most backend developers.
PHP is a common open source scripting language. The syntax absorbs the features of the C language, Java, and Perl, which is easy to learn and widely used. it is mainly applicable to the Web development field and is the first choice for most backend developers.
As one of the most popular programming languages, PHP often appears in the battle of major languages. but who is the best programming language? You have the final say :)
This article selects several useful and interesting tools from a number of open-source PHP libraries, hoping to help you with your learning work.
PHP Log tool Monolog
Monolog is a logging tool that supports more than 5.3 PHP logs. It is supported by default for Symfony2.
Sample code:
Excel operation Library PHPExcel
PHPExcel is a PHP library used to read and write Excel 2007 (OpenXML) files.
Sample code:
PHP machine learning library PHPML
PHPml is the machine learning library of PHP. It also includes algorithms, cross-validation, neural networks, preprocessing, and feature extraction.
Sample code:
PHP OAuth Library Opauth
Opauth is an open-source PHP library that provides OAuth support, so that you do not need to pay attention to the differences between different providers and provide unified and standard access methods.
Currently, Google, Twitter, and Facebook are supported, and other providers will be supported one after another. It also supports processing any OAuth Authentication provider.
PHP Cache Library phpFastCache
PhpFastCache is an open-source PHP Cache library that provides only one simple PHP file and can be easily integrated into existing projects. it supports multiple caching methods, including apc, memcache, memcached, and wincache, files, pdo and mpdo. You can use a simple API to define the cache validity period.
Sample code:
PHP framework Guzzle
Guzzle is a PHP framework that solves the problem of sending a large number of HTTP requests and creating web service clients.
It includes tools for creating solid service clients, including service descriptions to define API input and output, implementing resource iteration through paging resources, and sending a large number of requests in batches as efficiently as possible.
Sample code:
Css js merge/compression Munee
Munee is a PHP library integrating image size adjustment, css js merging/compression, cache, and other functions. Resources can be cached on the server and client.
It integrates the PHP image operation Library Imagine to adjust and cut the image size and then cache the image.
Sample code:
PHP template language Twig
Twig is a flexible, fast, and secure PHP template language. It compiles the template into the optimized original PHP code. Twig has a Sandbox model to detect untrusted template code.
Twig consists of a flexible lexical analyzer and syntax analyzer, allowing developers to define their own tags, filter and create their own DSL.
Sample code:
PHP crawler Library Goutte
Goutte is a PHP library that captures website data. It provides an elegant API, which makes it easy to select a specific element from a remote page.
Sample code:
PHP debugging Library Whoops
Whoops is suitable for PHP environment error capture and debugging PHP libraries; whoops is very easy to use, it provides stackbased error capture and superb error viewing.
PHP mail package PHPMailer
PHPMailer is a PHP function package used to send emails. It provides the following functions:
Specify multiple recipients, CC addresses, hidden addresses, and reply addresses when sending mail.
Multiple email codes are supported, including 8bit, binary, and quotedprintable.
Support for SMTP verification
Support for redundant SMTP servers
Supports attachments and Html-formatted emails.
Custom mail header
Images can be embedded in emails.
Flexible debugging
Compatible SMTP servers include Sendmail, qmail, Postfix, Imail, and Exchange.
Can run on any platform
PHP Chart creation pChart
PChart is an open-source PHP chart production project based on the GD library (graphic processing function library. Multiple chart types are supported:
Line chart
Cubic curve chart
Plot chart
Bar chart
Filled line chart
Filled cubic curve chart
Pie chart
Radars chart
Limits chart
PHP quick development class library Eden
Eden is an open-source and free PHP quick development class library. It contains many components for automatic loading, event-driven, document system, caching, templates, internationalization, databases, web services, payment gateways, loading and cloud service technologies.
PHP-generated PDF class FPDF
FPDF: This PHP Class allows you to use pure PHP (more specifically, PDFlib is not required) to generate a PDF file.
It has the following features:
Optional unit size, page format and page edge distance;
Manage headers and footers;
Automatic paging;
Automatic line feed and automatic text alignment;
Supports JPEG and PNG image formats;
Supports coloring and file hyperlinks;
Supports TrueType, Type1, and encoding;
Page compression is supported.
Sample code:
PHP Error
PHP Error is an open-source PHP library used to convert standard PHP Error information and is mainly used for debugging during development. PHP errors are tightly integrated into the PHP environment, displaying syntax-highlighted Error messages.
PHP unit test framework SimpleTest
SimpleTest is a unit test framework provided for PHP programs. it contains an embedded web browser used to test PHP Web websites.
Sample code:
PHP WebSockets development kit PHP Ratchet
Ratchet is a loosely coupled PHP library that provides support for creating real-time, bidirectional client server WebSockets applications.
Sample code:
Modular PHP library set Hoa
Hoa is a modular, scalable, and structured collection of PHP libraries. Hoa's goal is to build a bridge between industry and research.
Hoa can create its own applications and libraries through combination and extension.