Learning Stylus – A CSS Pre-Processor

How the content is displayed for this mini-series will be a little different to how you may see other articles on my site. Really this article is more geared as notes for me as I go through the documentation for Stylus, and learn the in’s and out’s of this beautiful language. Feel free to reference […]

Read More »

Void Return Types in PHP

As of PHP 7.1, we can now use void return types within our methods. This is useful for cases where you have methods that are just setting or processing data with out the need of returning any values. Functions or Methods declared with void as their return type would simply use an empty return statement […]

Read More »

Type Hinting with Nullable Types in PHP

As of PHP 7.1, you can now set your type declarations as nullable by simply prefixing them with a question mark ?. In doing so a null value can be passed in as a parameter or returned as a value for your methods. Let’s look at an example where we setup a simple product class […]

Read More »

PHP Group Multiple use Declarations

As of PHP 7, you can now group your imported classes, functions, and constants from under the same namespace. Let’s look at a example to show you how you can start using this today in your projects. Previously you’d have to write out your imports like so:

Now you can group them since they […]

Read More »

PHP Null Coalescing Operator

One of my new favorite additions to PHP 7, is the Null Coalesce Operator. It cleans up your code by removing a tedious step of checking if some value is isset() and not NULL and returning it or if not setting a default. I think the best way to show you this example, is maybe […]

Read More »

PHP Spaceship Operator

One of the new features to hit PHP 7 is the Spaceship Operator. This new trick helps improve the way you’d compare 2 expressions. In short, the comparison returns 1 of 3 values (-1, 0, or 1) depending on the result of the comparison. Let’s look at a few examples below. The following comparisons each […]

Read More »

Return Type Declarations in PHP

PHP 7 now makes it possible to declare return types for your methods. This allows you better control over the data that will be returned from each method in your application. The types of data you can return include but are not limited to the following. self array callable bool float int string Apart from […]

Read More »

Scalar Type Hints in PHP

Starting with PHP 7.0, it’s now possible to declare scalar type hints for your method arguments. Previously, we we’re able to use array and callable, but now with PHP 7+, we have access to the following list. bool float int string This allows you to build your class methods by explicitly defining the type of […]

Read More »

Configuring Gulp With Less CSS Pre-Processor

Less is a CSS pre-processor allowing you to create variables, mixins, and functions in a effort to make your CSS more maintainable. In this article, we’ll discuss the process of getting less configured with gulp so that you can start using this CSS pre-processor today within your own projects. In this article, I touch on […]

Read More »