RSS

Forum | Yikes! A 25,000 line C file in PHP core--to parse dates!

This Forum is Currently Locked – Access is Read Only
You must be logged in to post
Search Forums:


 






Yikes! A 25,000 line C file in PHP core–to parse dates!

UserPost

4:44 PM
Dec 16, 2009


alecgorge

Member

posts 34

1

I am building a custom version of PHP for a special project (I will announce it on this forum soon Wink) and I noticed that one file took a really long time to compile. That strange file is ext/data/lib/parsedate.c for those who are curious.

This as I opened parsedate.c, Notepad++ hung for a few seconds. It was a 25,000 line file weighing in at almost 500 kb! The strangest part of it all is the 17,000 line switch statement it contains.

I have no idea what this file does beyond parse dates, but I found it interesting all the same.