Skip to content

Commit f71b7d1

Browse files
author
Martin Brecht-Precht
committed
Removed PHP 5.3 from travis.yml
Fixed the minimum required version at composer.json Updated readme.
1 parent 383cf52 commit f71b7d1

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ branches:
55
- master
66

77
php:
8-
- '5.3'
98
- '5.4'
109
- '5.5'
1110
- '7.0'

README.md

+24-16
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ $result = $builder->buildSubstring(5);
5959
fwrite(STDOUT, ' 3. Built substring ' . $result . PHP_EOL);
6060
6161
$result = $builder->charAt(5);
62-
fwrite(STDOUT, ' 4. Character ' . $result . PHP_EOL);
62+
fwrite(STDOUT, ' 4. Character at position 5 ' . $result . PHP_EOL);
63+
64+
$result = $builder->firstChar();
65+
fwrite(STDOUT, ' 5. First character ' . $result . PHP_EOL);
66+
67+
$result = $builder->lastChar();
68+
fwrite(STDOUT, ' 6. Last character ' . $result . PHP_EOL);
6369
```
6470

6571
will output the following
@@ -68,44 +74,46 @@ will output the following
6874
1. Built string ä2wertzem ipsum dolor sit amet, conset
6975
2. Built substring rt
7076
3. Built substring rtzem ipsum dolor sit amet, conset
71-
4. Character r
77+
4. Character at position 5 r
78+
5. First character ä
79+
6. Last character t
7280
```
7381

7482
### Getting string properties
7583

7684
```{php}
7785
$result = $builder->length();
78-
fwrite(STDOUT, ' 5. String length ' . $result . PHP_EOL);
86+
fwrite(STDOUT, ' 7. String length ' . $result . PHP_EOL);
7987
8088
$result = $builder->size();
81-
fwrite(STDOUT, ' 6. Number of bytes ' . $result . PHP_EOL);
89+
fwrite(STDOUT, ' 8. Number of bytes ' . $result . PHP_EOL);
8290
8391
$result = $builder->indexOf('e');
84-
fwrite(STDOUT, ' 7. First occurence of "e" ' . $result . PHP_EOL);
92+
fwrite(STDOUT, ' 9. First occurence of "e" ' . $result . PHP_EOL);
8593
8694
$result = $builder->indexOf('e', 5);
87-
fwrite(STDOUT, ' 8. First occurence of "e" after position 5 ' . $result . PHP_EOL);
95+
fwrite(STDOUT, '10. First occurence of "e" after position 5 ' . $result . PHP_EOL);
8896
8997
$result = $builder->lastIndexOf('e');
90-
fwrite(STDOUT, ' 9. Last occurence of "e" ' . $result . PHP_EOL);
98+
fwrite(STDOUT, '11. Last occurence of "e" ' . $result . PHP_EOL);
9199
92100
$result = $builder->lastIndexOf('e', 5);
93-
fwrite(STDOUT, '10. Last occurence of "e" before the 5th last character ' . $result . PHP_EOL);
101+
fwrite(STDOUT, '12. Last occurence of "e" before the 5th last character ' . $result . PHP_EOL);
94102
95103
$result = $builder->contains('ipsum');
96-
fwrite(STDOUT, '12. Whether the string contains "ipsum" ' . $result . PHP_EOL);
104+
fwrite(STDOUT, '13. Whether the string contains "ipsum" ' . $result . PHP_EOL);
97105
```
98106

99107
will output the following
100108

101109
```{txt}
102-
5. String length 38
103-
6. Number of bytes 39
104-
7. First occurence of "e" 4
105-
8. First occurence of "e" after position 5 8
106-
9. Last occurence of "e" 37
107-
10. Last occurence of "e" before the 5th last character 29
108-
12. Whether the string contains "ipsum" <TRUE>
110+
7. String length 38
111+
8. Number of bytes 39
112+
9. First occurence of "e" 4
113+
10. First occurence of "e" after position 5 8
114+
11. Last occurence of "e" 37
115+
12. Last occurence of "e" before the 5th last character 29
116+
13. Whether the string contains "ipsum" <TRUE>
109117
```
110118

111119
### Exception handling

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
},
2323
"require": {
24-
"php": ">=5.3"
24+
"php": ">=5.4"
2525
},
2626
"require-dev": {
2727
"phpunit/phpunit": ">=4.8.26",

0 commit comments

Comments
 (0)