memesearch
PHP as a C Preprocessor

PHP as a C Preprocessor

Download Find similar pictures
Text on the meme
You can use PHP as a C preprocessor. The advantages are: very similar syntax, so syntax highlighting works. <? and ?> are not used in standard C (with non-standard C, the only thing that gets broken is old GCC extension operator that returns min/max) it's rich in libraries. it's turing complete. usage of macros is very explicit. (compared to sneaky C preprocessor macros) For serious use though, making PHP print the #line directives is needed for debugging preprocessed code. <?php include_once "stdio.h"; ?> int main() { <?php for($i = 0; $i < 20; $i++) echo 'printf("%d\n", '.$i.');'; ?> }
What it means

A Stack Overflow post explains that PHP can be used as a C preprocessor and lists its advantages. The joke is the absurd demonstration: PHP code generates C code, treating a web scripting language as a serious C preprocessing tool. This meme is sent as a reaction to overengineered programming solutions or humorous language misuse.

Objects
Tags
Sources
Type
image
Size
800×544 · 58.6 KiB
Mood
absurd, sarcastic
Language
en
Added

Similar memes