Git Product home page Git Product logo

twigphpnocomposer's Introduction

Twig PHP (Without Composer)

A ready-to-use example for using Twig template engine without needing to Composer in PHP.

Story of this Twig example

Twig is one of the popular and good engines which is suitable for most needs for templates. But the main problem is that it's a complex library and there are many sub directories and files. You have to use Composer in your project.

So what about if your current code bases is not going to use Composer?

Yeah, so this is the goal of this repository to provide a ready to use example for using Twig without Composer. so easily can use latest version of Twig without needing to Composer.

Using

$ php example.php

Twig Version

In the current time, the latest version of Twig is 3.4.1, if you are trying to use this template in future maybe you can check https://github.com/twigphp/Twig/tags page to use the latest version.

For example you can download latest version as ZIP file. such as https://github.com/twigphp/Twig/archive/refs/tags/v3.4.1.zip

Demo

Input:

<h1>Hello {{ name }}!</h1>

Output:

Hello Max!

Performance

The takes time to include files and run the engine and print the example output was 0.0048439502716064s which is super fast.

twigphpnocomposer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

maxbyz am0n666

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.