public
anonymous / how to compile
Created

php instead of c preprocessor

  • Download Gist
how to compile
1
php test.c | gcc -xc -o test -
test.c
C
1 2 3 4 5 6 7 8
<?php include_once('/usr/include/stdio.h'); ?>
 
int main() {
<?php for ($i = 0; $i < 10; ++$i) { ?>
printf("Hello, world!\n");
<?php } ?>
return 0;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.