All Projects → marcioAlmada → xray

marcioAlmada / xray

Licence: MIT license
X-Ray - PHP Engine compiler hook API (new)

Programming Languages

c
50402 projects - #5 most used programming language
M4
1887 projects

Projects that are alternatives of or similar to xray

Seaslog
An effective,fast,stable log extension for PHP.http://pecl.php.net/package/SeasLog http://php.net/SeasLog
Stars: ✭ 1,136 (+5878.95%)
Mutual labels:  php-extension
Msphpsql
Microsoft Drivers for PHP for SQL Server
Stars: ✭ 1,570 (+8163.16%)
Mutual labels:  php-extension
Ycdatabase
The lightest php database framework written in c language, built in php extension, for mysql
Stars: ✭ 130 (+584.21%)
Mutual labels:  php-extension
Gutenberg Parser Rs
An experimental Rust parser for WordPress Gutenberg post format
Stars: ✭ 76 (+300%)
Mutual labels:  php-extension
Ip2region
Ip2region is a offline IP location library with accuracy rate of 99.9% and 0.0x millseconds searching performance. DB file is ONLY a few megabytes with all IP address stored. binding for Java,PHP,C,Python,Nodejs,Golang,C#,lua. Binary,B-tree,Memory searching algorithm
Stars: ✭ 9,836 (+51668.42%)
Mutual labels:  php-extension
Php Rdkafka
Production-ready, stable Kafka client for PHP
Stars: ✭ 1,703 (+8863.16%)
Mutual labels:  php-extension
Php Spx
A simple & straight-to-the-point PHP profiling extension with its built-in web UI
Stars: ✭ 972 (+5015.79%)
Mutual labels:  php-extension
Php V8
PHP extension for V8 JavaScript engine
Stars: ✭ 197 (+936.84%)
Mutual labels:  php-extension
Ext Collections
Array manipulation extension for PHP.
Stars: ✭ 94 (+394.74%)
Mutual labels:  php-extension
Php Zephir Parser
The Zephir Parser delivered as a C extension for the PHP language.
Stars: ✭ 129 (+578.95%)
Mutual labels:  php-extension
Php Rs
A library to build PHP extensions in Rust.
Stars: ✭ 81 (+326.32%)
Mutual labels:  php-extension
Php Ext Collection
PHP collection extensions - PHP Version 7.x
Stars: ✭ 89 (+368.42%)
Mutual labels:  php-extension
V8js
V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
Stars: ✭ 1,659 (+8631.58%)
Mutual labels:  php-extension
Php Ion
Asynchronous PHP
Stars: ✭ 65 (+242.11%)
Mutual labels:  php-extension
Pht
A new threading extension for PHP
Stars: ✭ 175 (+821.05%)
Mutual labels:  php-extension
Phptdlib
PHP Extension for tdlib/td written with PHP-CPP
Stars: ✭ 59 (+210.53%)
Mutual labels:  php-extension
Php Akm
Ahocorasick keyword match.
Stars: ✭ 116 (+510.53%)
Mutual labels:  php-extension
MahjongKit
Riichi Mahjong Kit: (1) Game log crawler (sqlite3, json, bs4); (2) Game log preprocessor; (3) Deterministic algorithms library
Stars: ✭ 39 (+105.26%)
Mutual labels:  preprocessor
Php Psr
PHP extension providing the accepted PSR interfaces
Stars: ✭ 189 (+894.74%)
Mutual labels:  php-extension
Cphalcon
High performance, full-stack PHP framework delivered as a C extension.
Stars: ✭ 10,534 (+55342.11%)
Mutual labels:  php-extension

X-Ray

Build Status Percentage of issues still open License

X-Ray allows declaration of Zend Engine include(), require() and eval() hooks.:

How to use:

// adding a compiler hook:
xray\set_compiler_hook(function(string $source, string $filename = null) : string {
    if ($filename === null)  {
        // here we intercept source included through eval()
        // do transformations on $source and return the new $source to be included        
    }
    else {
        // here we intercept source included from a *.php file
        // do transformations on $source and return the new $source to be included
    }
});

// removing the compiler hook:
$hook = xray\restore_compiler_hook();

How to install:

git clone https://github.com/marcioAlmada/xray
cd xray
phpize
./configure
make
sudo make install

Finally add extension=xray.so to your /etc/php.ini

Windows Support

Pull requests welcome. Anyone?

Why?

A compiler hook API was needed in order to have a decent infrastructure for YAY. But this ended up as a more general purpose internal framework so others projects can benefit too.

Copyright

Copyright (c) 2015-* Márcio Almada. Distributed under the terms of an MIT-style license. See LICENSE for details.

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