• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Chrispian H. Burks

coder. maker. writer. photographer.

  • Home
  • Dreams
  • Dev Links
  • About Me
  • Contact

PHP

 
 A Beginner’s Guide to Querying the Slack API | Tom McFarlin

Creating Slack applications can be as time-consuming and complex as writing any other type of application. What if you’re interested in querying the Slack API for your workspace and incorporating the results in a WordPress plugin? Here’s how you can get started.

Filed Under: PHP  

 
 Microservice API Patterns: A Language for API Design

In the overall API lifecycle, it is important to first align APIs with business capabilities, turn this into a clear and business-aligned value proposition for the API, and to also produce some API stories that demonstrate how to use that new digital building block.

Filed Under: Backend   PHP   Software Engineering  

 
 Load Classes By Namespace | Tom McFarlin

TL;DR: To dynamically load classes by namespaces in PHP, you need a Registry, and a way to parse the concrete files from a directory based on its namespace.

Filed Under: PHP  

 
 Quick Tip: Change PHP Versions with Homebrew on Apple Silicon Powered Macs – WebDevStudios

Homebrew makes managing packages on macOS easy. However, Apple’s new silicon is based on ARM64 architecture. This means that not every package or app can run natively (yet). Thankfully, Rosetta 2 helps bridge the gap by “translating software” so it can run on this new architecture.

I'm getting one of the new M1's for work so I know I'm going to need this. I'm sure other's might too.

Filed Under: PHP  

 PHP RFC: Named Arguments

Named arguments allow passing arguments to a function based on the parameter name, rather than the parameter position. This makes the meaning of the argument self-documenting, makes the arguments order-independent, and allows skipping default values arbitrarily.

[ via: @justCarakas ]

Another RFC proposed for PHP 8. Not sure exactly how I feel about this one yet. I like the idea but Jeremy also pointed out that then params become part of the public API. Need to think about this one some more. -Chrispian

Filed Under: Dev   PHP   PHP8   Software Engineering  

 PHP RFC: Nullsafe operator

Short circuiting refers to skipping the evaluation of an expression based on some given condition. Two common examples are the operators && and ||. There are three ways the nullsafe operator ?-> could implement short circuiting. We’ll look at the same code snippet for every option.

[ via: @markjaquith ]

I like this idea. I usually don't like things that makes code less easy to understand and favor being more verbose. In this case I think this one actually makes it easier to read and might make it a little easier to avoid making silly mistakes. -Chrispian

Filed Under: Dev   PHP   PHP8   Software Engineering  

 Array destructuring in PHP

In PHP, list or [] is a so called "language construct", just like array(). This language construct is used to "pull" variables out of an array. In other words: it will "destructure" the array into separate variables.

Filed Under: Arrays   PHP  

Primary Sidebar

My name is Chrispian and I like to make things. I'm a web developer and have been working in the computer / internet field for almost 26 years now. I also draw, write, make things, take pictures and love figuring stuff out. Read More

Let’s Connect

  • Facebook
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Copyright © 2023 · Groovy 1976 Theme by Chrispian H. Burks · Built using Genesis Framework & WordPress Log in