This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
class Program {
|
||||
private $s = 'monkey';
|
||||
private $t = 'many monkeys';
|
||||
private $n = 43951789;
|
||||
private $u = -43951789;
|
||||
private $c = 65;
|
||||
private string $s = 'monkey';
|
||||
private string $t = 'many monkeys';
|
||||
private int $n = 43951789;
|
||||
private int $u = -43951789;
|
||||
private char $c = 65;
|
||||
|
||||
public function main() {
|
||||
public void main() {
|
||||
$this->testMonkey();
|
||||
$this->testNumbers();
|
||||
}
|
||||
|
||||
private function testMonkey() {
|
||||
private void testMonkey() {
|
||||
printf("[%s]\n", $this->s);
|
||||
printf("[%10s]\n", $this->s);
|
||||
printf("[%-10s]\n", $this->s);
|
||||
@@ -19,7 +19,7 @@ class Program {
|
||||
printf("[%10.10s]\n", $this->t);
|
||||
}
|
||||
|
||||
private function testNumbers() {
|
||||
private void testNumbers() {
|
||||
printf("%%b = '%b'\n", $this->n);
|
||||
printf("%%c = '%c'\n", $this->c);
|
||||
printf("%%d = '%d'\n", $this->n);
|
||||
|
Reference in New Issue
Block a user