3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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!' : implode($emailed, ', ') . count($emailed) == 1 ? ' was sent an invite' : ' were sent invites!'; print_r(implode($emailed, ', ') . " " . count($emailed) == 1 ? ' was sent an invite' : ' were sent invites!');
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
were sent invites!