Skip to content

Instantly share code, notes, and snippets.

@co3k
Created July 30, 2010 14:58
Show Gist options
  • Save co3k/500664 to your computer and use it in GitHub Desktop.
Save co3k/500664 to your computer and use it in GitHub Desktop.
<?php
require_once '/home/co3k/www/sf/b-tuning3/lib/vendor/symfony/lib/util/sfInflector.class.php';
require_once '/home/co3k/www/sf/b-tuning3/lib/vendor/symfony/lib/util/sfToolkit.class.php';
$classStr = file_get_contents('/home/co3k/www/sf/b-tuning3/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Tokenizer.php');
$classStr = preg_replace('/(protected|private)/', 'public', $classStr);
$classStr = str_replace(array('<?php', '?>'), '', $classStr);
eval($classStr);
// ---------------------------------------
$str = 'dctrn_find.id = ?';
$regexp = '#(\s)#';
$tokenizer = new Doctrine_Query_Tokenizer();
var_dump(serialize(dql_clause_explode_count_brackets($str, $regexp)) == serialize($tokenizer->clauseExplodeCountBrackets($str, $regexp)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment