Last active
August 29, 2015 14:08
-
-
Save pbull/b04f1ac473650ddf95a6 to your computer and use it in GitHub Desktop.
This code will segfault php 5.5 (for testing/debugging purposes)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$contents = '/*' . str_repeat('a', 60000) . '*/ Test1'; | |
$contents = preg_replace('< | |
\s*([@{}:;,]|\)\s|\s\()\s* | # Remove whitespace around separators, but keep space around parentheses. | |
/\*([^*\\\\]|\*(?!/))+\*/ | # Remove comments that are not CSS hacks. | |
[\n\r] # Remove line breaks. | |
>x', '\1', $contents); | |
print $contents; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment