3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cards = explode(',', '16, 01, 05'); $users = explode(',', 'User2, User1, User7'); $images = explode(',', 'img2.jpg, img1.jpg, img7.jpg'); $cards = array_map('trim', $cards); $users = array_map('trim', $users); $images = array_map('trim', $images); foreach ($cards as $key => $value) { echo sprintf( 'Box %02d = %s (%s link)', $cards[$key], $users[$key], $images[$key] ) . PHP_EOL; }
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
Box 16 = User2 (img2.jpg link) Box 01 = User1 (img1.jpg link) Box 05 = User7 (img7.jpg link)

preferences:
67.53 ms | 407 KiB | 5 Q