Markdown is one of the most popular markup languages on the Web. Unfortunately, with no standard specification, every implementation works differently, producing varying results across different platforms. The CommonMark specification fixes this by providing an unambiguous syntax specification and a comprehensive suite of tests. Attendees will learn about this standard and how to integrate the league/commonmark parser into their applications. We will also cover how to add new custom features.
Recent Activity
league/commonmark is a well-written, super-configurable Markdown parser for PHP based on the CommonMark spec. In this lightning talk, we’ll introduce the CommonMark spec, discuss why it’s important, and demonstrate how the league/commonmark project can be used and extended for your own PHP projects.
In this episode I discuss PHP 7 and my PHP 7 Upgrade Guide e-book.
Installing PHP 7.0 is easier than ever. Here are instructions for installing the latest version on different platforms:
PHP 5.x Conflicts
gulp-eol-enforce is a simple Gulp plugin which tests the line endings of files. For example, if you prefer Linux-style line endings, this plugin will throw an error if any files contain Windows line endings. This is particularly useful when used as a pre-commit hook.
With the imminent release of PHP 7 on the horizon, I thought it would be cool to check out some of the lesser-known features coming with the 7.0.0 release:
1. Array constants in define()
PHP 5.6 added the ability to define array constants on classes by using the const
keyword:
const LUCKY_NUMBERS = [4, 8, 15, 16, 23, 42];
PHP 7 brings this same functionality to the define()
function:
This post demonstrates how Blackfire was used to identify slowness in the league/commonmark parser. These findings were then used to implement two simple optimizations resulting in a 53% performance boost!
Software bugs are inevitable; some are especially difficult to track down, causing you to waste countless hours before throwing your hands up in defeat. It doesn't have to be this way! The mental fatigue and wasted time can be avoided by using strategies like identifying the most-appropriate tool, taking a logical & objective approach, challenging assumptions, listening to variables, isolating the code path, and reinforcing code with automated tests.
The PHP 7 release is just around the corner, bringing some much-desired changes and improvements to the language. However, many developers simply aren't aware of what's coming. We'll remedy this by checking out the new "spaceship operator," demonstrating how static type hints produce clean code, and using anonymous classes to quickly implement interfaces on the fly. Attendees will also learn about breaking changes and "gotchas" to watch out for when making the upgrade and will receive pointers on getting started with PHP 7 today.
Believe it or not, there's a lot more to debugging your PHP code than var_dump()'ing all the things. We discuss how to use debugging tools to help us comprehensively debug our codebase.