class Program { private string $s = 'monkey'; private string $t = 'many monkeys'; private int $n = 43951789; private int $u = -43951789; private char $c = 65; public void main() { $this->testMonkey(); $this->testNumbers(); } private void testMonkey() { printf("[%s]\n", $this->s); printf("[%10s]\n", $this->s); printf("[%-10s]\n", $this->s); printf("[%010s]\n", $this->s); printf("[%'#10s]\n", $this->s); printf("[%10.10s]\n", $this->t); } private void testNumbers() { printf("%%b = '%b'\n", $this->n); printf("%%c = '%c'\n", $this->c); printf("%%d = '%d'\n", $this->c); printf("%%d = '%d'\n", $this->n); printf("%%e = '%e'\n", $this->n); printf("%%u = '%u'\n", $this->n); printf("%%u = '%u'\n", $this->u); printf("%%f = '%f'\n", $this->n); printf("%%o = '%o'\n", $this->n); printf("%%s = '%s'\n", $this->n); printf("%%x = '%x'\n", $this->n); printf("%%X = '%X'\n", $this->n); printf("%%+d = '%+d'\n", $this->n); printf("%%+d = '%+d'\n", $this->u); } }