All Projects → MagicalTux → Goro

MagicalTux / Goro

Licence: bsd-3-clause
PHP in Go

Programming Languages

golang
3204 projects
language
365 projects

Projects that are alternatives of or similar to Goro

pymonero
Python Monero, a fork of monero-project/monero to deliver python c++ bindings
Stars: ✭ 12 (-98.19%)
Mutual labels:  help-wanted
ktPlayer-Music-Player
ktPlayer - Music Player on Java 8 with using JavaFX (Desktop)
Stars: ✭ 22 (-96.68%)
Mutual labels:  help-wanted
Hacktoberfest
Hacktoberfest 2018. Check out the end video for this project ->
Stars: ✭ 406 (-38.76%)
Mutual labels:  help-wanted
aws-web-analytics
Privacy-focused alternative to Google Analytics on AWS Pinpoint
Stars: ✭ 45 (-93.21%)
Mutual labels:  help-wanted
lexicon-mono-seq
DOM Text Based Multiple Sequence Alignment Library
Stars: ✭ 15 (-97.74%)
Mutual labels:  help-wanted
Rel
💎 Modern Database Access Layer for Golang - Testable, Extendable and Crafted Into a Clean and Elegant API
Stars: ✭ 317 (-52.19%)
Mutual labels:  help-wanted
hack-tools
"Кали-заменитель". Располагает в себе большое количество утилит для взлома.
Stars: ✭ 39 (-94.12%)
Mutual labels:  help-wanted
Hello World
Hello World in all possible programmnig languages
Stars: ✭ 558 (-15.84%)
Mutual labels:  help-wanted
vault-php
Best Vault client for PHP that you can find
Stars: ✭ 57 (-91.4%)
Mutual labels:  help-wanted
Stratagus
The Stratagus strategy game engine
Stars: ✭ 403 (-39.22%)
Mutual labels:  help-wanted
quiplash
Quiplash replacement
Stars: ✭ 25 (-96.23%)
Mutual labels:  help-wanted
rfordatasciencewiki
Resources for the R4DS Online Learning Community, including answer keys to the text
Stars: ✭ 40 (-93.97%)
Mutual labels:  help-wanted
Weibospider
新浪微博爬虫,用python爬取新浪微博数据
Stars: ✭ 4,861 (+633.18%)
Mutual labels:  help-wanted
admbrowser
A Web browser for kiosks and digital signage, based on Python, PyQt, and Blink
Stars: ✭ 25 (-96.23%)
Mutual labels:  help-wanted
Gitstart
Make a Pull Request
Stars: ✭ 415 (-37.41%)
Mutual labels:  help-wanted
horahora
Self-hosted video-hosting website and yt-dlp video archival manager for Niconico, Bilibili, and Youtube
Stars: ✭ 536 (-19.16%)
Mutual labels:  help-wanted
Women Teaching Tech
Uma lista de canais ou cursos sobre tecnologia feitos por mulheres.
Stars: ✭ 256 (-61.39%)
Mutual labels:  help-wanted
Algorithms
A repository of different Algorithms and Data Structures implemented in many programming languages.
Stars: ✭ 578 (-12.82%)
Mutual labels:  help-wanted
Contribute To This Project
This project is waiting for your contribution. If you have never contributed code on GitHub before, this is the project to get you started.
Stars: ✭ 501 (-24.43%)
Mutual labels:  help-wanted
Boxbilling
BoxBilling - Open source billing and client management software
Stars: ✭ 372 (-43.89%)
Mutual labels:  help-wanted

Goro

Build Status GoDoc Telegram

This is an implementation of PHP, written in pure Go (as much as possible, right now pcre doesn't exist in pure go and require usage of libpcre).

Why?

That's a good question. PHP is a nice language but is having trouble keeping up with modern languages. This implementation, while far from finished, is trying to make a number of things possible:

  • Usage of goroutines, go channels, etc from within PHP
  • Better caching of compiled code by allowing sharing of compiled or live objects (classes, objects, etc) between running PHP scripts
  • Use Go's memory management within PHP
  • Ability to run functions or code sandboxed (including filesystem) to limit security risks
  • Easily call the PHP engine from Go to execute pieces of PHP code (user provided or legacy)

Install

In order to run php code as cli:

go get github.com/MagicalTux/goro/sapi/php-cli

Status

This is still a very early implementation and most of the core is missing.

TODO

The following needs to be done before we can call this an alpha version.

  • Fix arguments passed by reference for builtin methods
  • Error reporting, lower level of errors (warnings, etc)
  • php.ini handling
  • Streams & filesystem support
  • command line flags handling
  • Class and object implementation is still very early. Access checks are missing. Class inheritance, etc are missing
    • Class abstract
    • Builtin class methods
    • Interfaces
    • Exception throwing
    • Traits
  • break/continue needs improvement/fixing
  • declare
  • goto ?
  • namespaces
  • generators
  • predefined superglobals
  • implement Complex (curly) variable syntax (see: http://php.net/manual/en/language.types.string.php#language.types.string.parsing.complex )
  • Allow process to run in containers on linux (see https://github.com/lizrice/containers-from-scratch - would be useful to create a play interface for goro)

Extensions

Sorted by priority.

Extension Status Notes
standard 5% a lot of work remaining
json 33% Need custom impl to support php arrays
pcre 5% currently using cgo version of libpcre
session
date 1%
SPL
iconv using golang.org/x/text/transform
curl using net/http
hash 50%
mysqli
gmp 20% Using math/big
mbstring
mcrypt
openssl using crypto packages
Reflection
tokenizer already in core/tokenizer, needs to be exposed
xml...
gd without gd
bz2 1%
zlib
calendar
Phar
ctype 100%
sockets

Concepts

Process

A process object will typically be created only once in a runtime environment, and is used to keep some objects cached, as well as global stream wrapper resources. Persistant connections, run time cache, etc are stored at the Process level.

GlobalCache (optional)

A special global status intermediate between Process and Global that causes declarations of classes and functions to be kept between scripts, typically useful when using an autoloader.

Global

When a request is received or execution of a script is requested, a new Global context is created. The global context contains runtime level details such as global variables, declared functions, classes, constants, etc.

Context

Context is a local context, such as within a running function etc. Global has a root context, and each function call causes instantiation of a new context so that variables space is kept separated.

Contributing

A lot of work is needed. The most important part is improving the documentation, followed by improving support of core features (see TODO in this file), and implement individual functions from the various PHP extensions.

Writing an extension is simple. Create a directory in ext, write code prefixed with a magic function defining comment and run the tools/buildext.php script to generate bindings/etc. Add your newly created extension to the main.go of each sapi to enable it by default.

Before contributing, please join the telegram group and/or create an issue on github in order to discuss and find out which parts you can work on and how to proceed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].