php

Wed, 10/25/2017 - 13:35

Migrate large amounts of data in Laravel with Artisan Console and Chunk

Submitted by markoshust Wed, 10/25/2017 - 13:35

I've recently had to create a script to migrate a large amount of data post-deployment. This presented a couple issues; one being that the script needed to be performant, another being that since it took at least a few minutes to run on a couple hundred thousand rows, I needed to display the status of the script for devops so it didn't appear to be hungup or failed.


Fri, 08/25/2017 - 16:21

PHP 7's null coalesce operator usage with Objects and Arrays

Submitted by markoshust Fri, 08/25/2017 - 16:21

PHP 7 introduced the null coalesce operator. Basically, it's syntactical sugar and shorthand when checking for the existence of a variable and then falling back to some value.

For example, this small script outputs bar, because $foo is not yet defined.

echo $foo ?? 'bar';

It's the same thing as writing the following, just much more readable and succinct:


Fri, 01/18/2013 - 15:32

Install ionCube loader on Mac OS X

Submitted by markoshust Fri, 01/18/2013 - 15:32

It might look to be a little tricky to get ionCube Loader installed on Mac OS X, but it's actually quite easy. The ionCube Loader lets you decrypt ionCube-encoded projects so you can run software that is encrypted by the developer, or software which may be protected to specific domains and/or locations.

First, you need to visit the ionCube Loader download page.