3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function generate_some_id($id, $append) { for ($i = strlen($id); $i < 8; $i++) { $id = '0' . $id; } return strtoupper(strtolower(substr($append, 0, 2))) . $id; } echo generate_some_id(12547, 'Lorem ipsum');
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
LO00012547