Skip to content

Instantly share code, notes, and snippets.

@hpbuniat
hpbuniat / xhmem.php
Created May 11, 2012 15:35
Find memory intensive functions in a bunch of xhprof-results (e.g. phpunit run with xhprof-listener)
<?php
class xhparser {
/**
* Content
*
* @var string
*/
private $_aFiles = array();
@hpbuniat
hpbuniat / tracAge.php
Created June 14, 2012 06:43
Read the latest modification date of a number of tracs
<?php
/**
* Read the latest modification date of a number of tracs
*/
class tracTest {
/**
* The http-client to use (w/ auth)
*
* @var Zend_Http_Client
@hpbuniat
hpbuniat / namespaceRefactor.php
Last active April 3, 2021 22:33
Super-simple script to convert a existing project to use namespaces
<?php
/**
* Super-simple script to convert a existing project to use namespaces
*
* @author Hans-Peter Buniat <[email protected]>
* @copyright 2012 Hans-Peter Buniat <[email protected]>
* @license http://opensource.org/licenses/BSD-3-Clause
*/
class namespaceRefactor {
@hpbuniat
hpbuniat / svn-version.php
Last active December 15, 2015 00:39
Get all versions of a specific file from svn
<?php
/**
* SVN-Version extractor of a specific file
*
* Get all versions of a specific file from svn
*/
// argument-handling
$aArgs = getopt('f:p:r:');
$iRevision = (true === empty($aArgs['r'])) ? 'HEAD' : $aArgs['r'];