3v4l.org

run code in 300+ PHP versions simultaneously
<?php $emailed = array('cam.hurd@gmail.com', 'bob@cheese.com'); $message = count($emailed) > 10 ? implode(array_slice($emailed, 0, 10), ', ') . 'and ' . count($emailed) . ' others were sent an invite!' : (count($emailed) > 2) ? 'Invites sent to: ' . implode($emailed, ', ') . '.' : (count($emailed) == 2) ? implode($emailed, ' and') . ' were invited' : $emailed[0] . ' was invited'; echo $message;

preferences:
50.59 ms | 402 KiB | 5 Q