Skip to content

Instantly share code, notes, and snippets.

View mhujer's full-sized avatar
🏠
Working remotely

Martin Hujer mhujer

🏠
Working remotely
View GitHub Profile
@mhujer
mhujer / gist:2730719
Created May 19, 2012 12:43
Found 6 Zend Framework issues during ZF training
Hi.
On this Thursday and Friday (17th and 18th May 2012), I was giving Zend Framework training. We went through all the stuff necessary for creating ZF apps. Surprisingly, even in those often basic features, my students or me found some issues:
1) http://framework.zend.com/issues/browse/ZF-10690 this one was fixed just in ZF2, but not in ZF 1 trunk (and was marked as Resolved)
2) http://framework.zend.com/issues/browse/ZF-10803 We stumbled accross this one when working on simple decorators
3) http://framework.zend.com/issues/browse/ZF-8211 When we created a base controller, Zend_Tool stopped working (this was also "Resolved")
4) http://framework.zend.com/issues/browse/ZF-12213 During practice of writing own validators, one student was getting erorrs, beacuse of usage of $this->_error() without parameters. He said he copied this part from manual :)
5) http://framework.zend.com/issues/browse/ZF-12214 When setting up basic file cache, we stumbled accross not very good error message when invalid directory is pro
@mhujer
mhujer / gist:2158624
Created March 22, 2012 14:27
Unexpected PHP behaviour when comparing number strings.
<?php
$a = '00020001000200120005';
$b = '00020001000200120003';
var_dump($a == $b); //true
var_dump($a === $b); //false
var_dump(strcmp($a, $b)); //1
@mhujer
mhujer / Module.php
Created December 10, 2011 18:35
Laděnka Module for ZF2 (proof of concept)
<?php
namespace Ladenka;
use Zend\Debug;
use Zend\Module\Consumer\AutoloaderProvider,
Zend\EventManager\StaticEventManager,
Nette\Diagnostics\Debugger;
@mhujer
mhujer / index.php
Created September 10, 2011 10:45
FirePHP example for Google Chrome
<?php
require_once('FirePHPCore/fb.php');
fb('Hello Chrome!', FirePHP::WARN);
fb(array(
'first' => 'line',
'second' => array(
1,
2,
3 => array(
'foo',