3v4l.org

run code in 200+ PHP versions simultaneously
<?php function randomNumberSequence($requiredLength = 7, $highestDigit = 8) { $sequence = ''; for ($i = 0; $i < $requiredLength; ++$i) { $sequence .= mt_rand(0, $highestDigit); } return $sequence; } $numberPrefixes = ['0812', '0813', '0814', '0815', '0816', '0817', '0818', '0819', '0909', '0908']; for ($i = 0; $i < 21; ++$i) { echo $numberPrefixes[array_rand($numberPrefixes)] , randomNumberSequence() , "\n"; }
based on vbUkS