Git Product home page Git Product logo

plus's Introduction

Plus

Build Status Total Downloads Latest Version License

For full documentation, visit php-plus.com.

Plus is a runtime compiler that adds features to PHP - It's also a package that you can require using composer, and is mainly used to add features and syntactic sugar to existing PHP code. Of course, those features arrive in PHP using runtime source code transformations. It was created by, and currently maintained by Nuno Maduro, and Christopher Pitt. Art work is provided by Caneco.

Enjoy a simple and powerful syntax that enables developers to build very complex applications far more quickly than before. Short closures, types, enumerations are just a few examples of what you get using Plus.

Try Plus in 10 seconds

Note: Plus is still work in progress and it's not out yet.

  • First, install:
composer require pre/plus
  • Then, in your editor, add the following declare:
<?php

declare(plus=1);

class User
{
    // A readonly property cannot be assigned after the constructor exits
    public readonly string $name;

    // No need for the `t_function` keyword
    public __construct(string $name) {
        $this->name = $name;
    }

    // One expression functions with return statement
    public getUppercasedName(): string => strtoupper($this->name);
}

Plus is open-sourced software licensed under the MIT license.

plus's People

Contributors

nunomaduro avatar localheinz avatar caneco avatar francislavoie avatar kukawski avatar

Watchers

James Cloos avatar

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.