<?php
$block = '*';
$pos = strpos($block, '*');
if ($pos !== false) {
$num = substr($block, 0, $pos);
}
$min = int str_pad($num,3,'0'); // 000 -> 0
$max = min(255,str_pad($num,3,'9'));
echo $min.'-'.$max;
- Output for 5.4.0 - 5.4.11
- Parse error: syntax error, unexpected 'str_pad' (T_STRING) in /in/VDVa0 on line 8
Process exited with code 255. - Output for 5.3.0 - 5.3.21
- Parse error: syntax error, unexpected T_STRING in /in/VDVa0 on line 8
Process exited with code 255.
preferences:
167.63 ms | 1395 KiB | 41 Q