File: 002.php3t

package info (click to toggle)
php3 3%3A3.0.18-0potato1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 17,736 kB
  • ctags: 11,198
  • sloc: ansic: 108,120; sh: 2,512; php: 2,024; yacc: 1,887; makefile: 1,038; perl: 537; pascal: 238; awk: 90; cpp: 28; sql: 11
file content (67 lines) | stat: -rw-r--r-- 2,060 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--TEST--
Formatted print functions                                  ...
--POST--
--GET--
--FILE--
<?php 

error_reporting(0);

printf("printf test 1:%s\n", "simple string");
printf("printf test 2:%d\n", 42);
printf("printf test 3:%f\n", 10.0/3);
printf("printf test 4:%.10f\n", 10.0/3);
printf("printf test 5:%-10.2f\n", 2.5);
printf("printf test 6:%-010.2f\n", 2.5);
printf("printf test 7:%010.2f\n", 2.5);
printf("printf test 8:<%20s>\n", "foo");
printf("printf test 9:<%-20s>\n", "bar");
printf("printf test 10: 123456789012345\n");
printf("printf test 10:<%15s>\n", "hyesterettsjustitiarius");
printf("printf test 11: 123456789012345678901234567890\n");
printf("printf test 11:<%30s>\n", "hyesterettsjustitiarius");
printf("printf test 12:%5.2f\n", -12.34);
printf("printf test 13:%5d\n", -12);
printf("printf test 14:%c\n", 64);
printf("printf test 15:%b\n", 170);
printf("printf test 16:%x\n", 170);
printf("printf test 17:%X\n", 170);
printf("printf test 18:%16b\n", 170);
printf("printf test 19:%16x\n", 170);
printf("printf test 20:%16X\n", 170);
printf("printf test 21:%016b\n", 170);
printf("printf test 22:%016x\n", 170);
printf("printf test 23:%016X\n", 170);
printf("printf test 24:%.5s\n", "abcdefghij");
printf("printf test 25:%-2s\n", "gazonk");

?>
--EXPECT--

printf test 1:simple string
printf test 2:42
printf test 3:3.333333
printf test 4:3.3333333333
printf test 5:2.50         
printf test 6:2.50000000000
printf test 7:0000000002.50
printf test 8:<                 foo>
printf test 9:<bar                 >
printf test 10: 123456789012345
printf test 10:<hyesterettsjustitiarius>
printf test 11: 123456789012345678901234567890
printf test 11:<      hyesterettsjustitiarius>
printf test 12:  -12.34
printf test 13:  -12
printf test 14:@
printf test 15:10101010
printf test 16:aa
printf test 17:AA
printf test 18:        10101010
printf test 19:              aa
printf test 20:              AA
printf test 21:0000000010101010
printf test 22:00000000000000aa
printf test 23:00000000000000AA
printf test 24:abcde
printf test 25:gazonk