Editing PHP

Editing PHP

A long time ago now someone I deeply respect told me I ought to learn some PHP. I didn’t. However, this website rendering engine is in pretty simple (but simple doesn’t mean unelegant) PHP code. The way the initial code is written, if a given post has a non-date name (e.g., YYYY-MM-DD-something.md) the current code would strip the file extension but leave the remaining letters. When PHP tries to convert these to a date it fails and returns the begining of PHP time (Jan 1, 1970). I ended up fixing the code for my use by just substring the first ten characters and all is well. However, that’s the point of this post. Once you have fluency in one or more programming language, especially general purpose ones, you can move in different waters. You at least have an idea of what the idiom is and what to look for and often that makes all of the difference.


Citation

BibTex citation:

@online{dewitt2022
author = {Michael E. DeWitt},
title = {Editing PHP},
date = 2022-10-10,
url = {https://michaeldewittjr.com/articles/2022-10-10-php},
langid = {en}
}

For attribution, please cite this work as:

Michael E. DeWitt. 2022. "Editing PHP." October 10, 2022. https://michaeldewittjr.com/articles/2022-10-10-php