- AOP - Aspect-oriented programming in PHP - http://aop-php.github.com/
- PreProcessor - macro-style processing - http://pecl.php.net/package/PreProcessor
- Meta - AST building from PHP Source - https://github.com/flavius/phpmeta/
- Runkit - Black magic for PHP - https://github.com/zenovich/runkit
- scalarobjects - Register methods on PHP scalars - https://github.com/nikic/scalar_objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function timer(callable $fn, $name, $freq=50000) | |
{ | |
$start = microtime(true); | |
$start_mem = memory_get_usage(true); | |
$things = []; | |
for ($i = 0; $i < $freq; $i++) | |
{ | |
$things[] = $fn(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require "xmlsimple" | |
require "colored" | |
def parse_test_cases(test_cases) | |
test_cases.each do |test_case| | |
errs = test_case["failure"] || test_case["error"] | |
if errs | |
puts ("-->" + test_case["name"]).red |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This is largely stolen from test.php in the Inline_C repo (https://github.com/pear/Inline_C/blob/master/test.php) | |
require_once("C.php"); | |
$function1 = <<<EOF | |
PHP_FUNCTION(times) | |
{ | |
long i,j; | |
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &i,&j) == FAILURE) { |
OlderNewer