3v4l.org

run code in 300+ PHP versions simultaneously
<?php // PHP 7.3 and older $parts = ['apple', 'pear']; $fruits = array_merge(['banana', 'orange'], $parts, ['watermelon']); var_dump($fruits); // PHP 7.4 $parts = ['apple', 'pear']; $fruits = ['banana', 'orange', ...$parts, 'watermelon']; var_dump($fruits);

preferences:
25.39 ms | 405 KiB | 5 Q