Skip to content

Instantly share code, notes, and snippets.

View mendelgusmao's full-sized avatar
😅
what's up?

Mendelson Gusmão mendelgusmao

😅
what's up?
View GitHub Profile
@mendelgusmao
mendelgusmao / results.txt
Created September 19, 2011 20:16
Results of tests with Ghetto-RPC between 8 versions of PHP in Windows
### 4.4.9 to 5.2.17 ###
X-Powered-By: PHP/4.4.9
Content-type: text/html
string(44) "compare_php_version() = From 4.4.9 to 5.2.17"
string(66) "Backend->backend_md5(The World) = cb4adbc5d0fca498acaa58729f40fff9"
string(76) "Backend2->backend_sha1(The World) = e0a97fc105f02a28430eb29fda4b37ade9bd43f4"
string(47) "Backend3::backend_version() = Backend is 5.2.17"
string(52) "Backend2(reused)->backend_raw(The World) = The World"
#################################################################
@mendelgusmao
mendelgusmao / _new.php
Created September 14, 2011 16:02
Instantiating a class with full parameter list using eval()
<?php
error_reporting(E_ALL);
function _new ($class_name, $constructor_parameters) {
$parameters = array();
$values = array_values($constructor_parameters);
@mendelgusmao
mendelgusmao / triangle.php
Created June 17, 2011 18:26
Generates a numeric pyramid based on a string or a sequence of numbers
<?
set_time_limit(120);
error_reporting(E_ALL ^ E_NOTICE);
$in = $_GET["in"];
//$op = $_GET["op"] == 1 ? 1 : 0;
$in = $_GET["mode"] == "rnd()" ? rand(1, str_repeat("9", rand(2,9))) : $in;
$num = explode(" ", $in);