PHP Templating

Open-source PHP projects categorized as Templating

Top 18 PHP Templating Projects

  • Twig

    Twig, the flexible, fast, and secure template language for PHP

    Project mention: XSS Attack - Why strip_tags is not enough | dev.to | 2023-09-13

    In the phase of outputting data, you can use template engines like Twig or Blade or htmlspecialchars function.

  • Mustache

    A Mustache implementation in PHP.

  • Cloudways

    Cloudways' Black Friday Offer - 1st Choice of Developers. Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.

  • Smarty

    Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic.

  • Plates

    Native PHP template system

    Project mention: What is your tech stack for blog websites? (not wordpress) | /r/webdev | 2023-06-07

    I use PHP with Route, the Plates template engine, and my blog posts are markdown files grouped by folder (year/month/day.md).

  • Latte

    ☕ Latte: the safest & truly intuitive templates for PHP. Engine for those who want the most secure PHP sites.

    Project mention: State of PHP templating | /r/PHP | 2023-04-25

    Have a look at Latte. It gives you a template engine that looks and feels a lot like PHP itself, rather than being a port of Python.

  • MtHaml

    Multi target HAML (HAML for PHP, Twig, <your language here>)

  • PHPTAL

    PHP Template Attribute Language — template engine for XSS-proof well-formed XHTML and HTML5 pages

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • Foil

    PHP template engine for native PHP templates

  • Phly Mustache

    PHP 5.3 Mustache implementation

  • Lex

    A lightweight template parser used by PyroCMS.

  • TextGenerator

    TextGenerator is a PHP package that aims to generate automated texts from data.

  • Tale Jade

    A complete and fully-functional implementation of the Jade template language for PHP

  • Aura.View

    Provides TemplateView and TwoStepView using PHP as the templating language, with support for partials, sections, and helpers.

  • vtpl

    Vtpl is a php template engine that ensures proper separations of concerns, the frontend logic is separated from presentation. The goal is to keep the html unchanged for better maintainability for both backend and frontend developers

    Project mention: That people produce HTML with string templates is telling us something | news.ycombinator.com | 2023-05-26
  • PhpEcho

    A native PHP template engine: One class to rule them all ;-)

  • Dataplater

    template engine that uses HTML data-* attributes so your templates look great before rendering

  • PHP-UI-Kit

    A toolkit for developing universal web interfaces with support for multiple CSS frameworks.

  • parsem

    Parser for YAML, JSON and NEON templates.

    Project mention: PHP file generator that can help automate your workflow and get rid of writing boilerplate | /r/PHP | 2023-04-13

    I actually realized this also few days back, so I'm planning this for the next major release, ditching the JSON templates and just use Pars'Em on the PHP/JS/Whatever files themselves.

  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-09-13.

PHP Templating related posts

Index

What are some of the best open-source Templating projects in PHP? This list will help you:

Project Stars
1 Twig 7,946
2 Mustache 3,208
3 Smarty 2,152
4 Plates 1,428
5 Latte 1,020
6 MtHaml 363
7 PHPTAL 175
8 Foil 168
9 Phly Mustache 122
10 Lex 103
11 TextGenerator 91
12 Tale Jade 90
13 Aura.View 85
14 vtpl 14
15 PhpEcho 10
16 Dataplater 7
17 PHP-UI-Kit 6
18 parsem 3
Learn any GitHub repo in 59 seconds
Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
getonboard.dev