~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to ext/standard/tests/strings/str_repeat.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
str_repeat() function
 
3
--FILE--
 
4
<?php
 
5
$input = array('a', 'foo', 'barbazbax');
 
6
foreach($input AS $i) {
 
7
        for($n=0; $n<5; $n++) {
 
8
                echo str_repeat($i, $n)."\n";
 
9
        }
 
10
}
 
11
?>
 
12
--EXPECT--
 
13
 
 
14
a
 
15
aa
 
16
aaa
 
17
aaaa
 
18
 
 
19
foo
 
20
foofoo
 
21
foofoofoo
 
22
foofoofoofoo
 
23
 
 
24
barbazbax
 
25
barbazbaxbarbazbax
 
26
barbazbaxbarbazbaxbarbazbax
 
27
barbazbaxbarbazbaxbarbazbaxbarbazbax