Giter VIP home page Giter VIP logo

phpifypy's Introduction

#PHPify.py Build Status

Your pythonic PHP experience.

Uses the state-of-the-art error suppressor FuckIt.py to bring the joy of programming PHP to Python.

Run broken code

PHPify.py lets you run broken code by using the amazing capabilities of FuckIt.py. Never mind code of newby programmers anymore. Just take any bit of code you see on the internet and run it without mercy. It won't always produce what you expect, but hey, who knows anyway?

Amazing error logging

PHPify.py tells you about all errors it finds and even tags a severity on them by using state-of-the-art language models. It will even tell you the time an error occured, so you can just log all errors away and examine them later.

API

The API inherited from FuckIt.py is simple to use and lets you PHPify single functions or classes as well as complete modules:

Add import phpify to the top of your script, then use phpify in any of the following ways:

As a replacement for import

Use phpify to replace an import when you want to run a module with the amazing capabilities of PHPify.py.

import phpify 
#import some_shitty_module
phpify('some_shitty_module')
some_shitty_module.some_function()

It's still not running and no errors a logged? We need more of PHPs superpower:

import phpify 
phpify(phpify('some_shitty_module'))
# This is definitely going to run now.
some_shitty_module.some_function()

As a decorator

Use phpify as a function decorator when you only want the force in a single function (you should not want that).

@phpify
def func():
    problem_solved  

You can use phpify as a class decorator, too.

@phpify
class C(object):
    def __init__(self):
        everything_works_now

##License DO WHAT YOU WANT TO PUBLIC LICENSE Version 2, December 2004

Copyright (C) 2014

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

                DO WHAT YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT YOU WANT TO.

Attribution

This module is a fork of AJ Alts FuckIt.py

phpifypy's People

Contributors

ajalt avatar jpiper avatar lechimp-p avatar ming13 avatar mozillazg avatar redchair123 avatar

Watchers

 avatar  avatar  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.