3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v = '10155674128355111'; if (strlen($v) > 9) { echo (int)((int)substr($v, 0, 9) % 6 . substr($v, 9)) % 6; } else { echo (int)$v % 6; }

preferences:
61.69 ms | 402 KiB | 5 Q