Skip to content

Instantly share code, notes, and snippets.

View niieani's full-sized avatar

Bazyli Brzóska niieani

View GitHub Profile
@niieani
niieani / XFormatterHelper.php
Created September 29, 2011 12:54
XFormatterHelper for Symfony2 Console - formatting multiple blocks side-by-side
<?php
/**
* By: Bazyli Brzóska
* Date: 25.09.2011
* Time: 01:09
*/
namespace Tools;
use \Symfony\Component\Console\Helper\FormatterHelper;
@niieani
niieani / gist:1213709
Created September 13, 2011 12:33
PHP Camel Case functions
<?php
// source: http://www.paulferrett.com/2009/php-camel-case-functions/
/**
* Translates a camel case string into a string with underscores (e.g. firstName -&gt; first_name)
* @param string $str String in camel case format
* @return string $str Translated into underscore format
*/
function from_camel_case($str) {
$str[0] = strtolower($str[0]);