Shift with red gradient lettering

Short array syntax

PHP
Legacy Code

Convert your code to use PHP's short array syntax.

Before

$numbers = array(1, 2, 3);
$numbers = array_merge($numbers, array(4, 5, 6));

After

$numbers = [1, 2, 3];
$numbers = array_merge($numbers, [4, 5, 6]);

← Back to the Workbench Tasks

Sign in with any of the following services to connect Shift with your Laravel project.


Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.