<?php // your code goes here$arr = [1, 2, 3, 4, 5];var_dump(array_merge(...array_map(null, $arr, $arr)));
Standard input is empty
array(10) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(2) [4]=> int(3) [5]=> int(3) [6]=> int(4) [7]=> int(4) [8]=> int(5) [9]=> int(5) }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!