Skip to content

Instantly share code, notes, and snippets.

@lbehm
Created May 15, 2012 14:34
Show Gist options
  • Save lbehm/2702238 to your computer and use it in GitHub Desktop.
Save lbehm/2702238 to your computer and use it in GitHub Desktop.
brainf**k of the last 15 minutes! =)
<?php
if(preg_match("/^; <\?php die\(\); \?>".PHP_EOL."([\w\d]+=[#$\w\d\/\"\\\]+".PHP_EOL.")*(\[[\w\d]+\]".PHP_EOL."([\w\d]+=[#$\w\d\/\"\\\]+".PHP_EOL.")*)*\$/im", @file_get_contents('conf.php') )){
echo ("match");
}
else{
echo ("didn't match");}
?>
; <?php die(); ?>
fo_o="_b\/a#$är"
[general]
foo="b\/aär"
t=123
t2=123
[foo]
bar="foobar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment