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

« back to all changes in this revision

Viewing changes to tests/strings/bug22592.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
Bug #22592 (Cascading assignments to strings with curly braces broken)
 
3
--FILE--
 
4
<?php
 
5
$wrong = $correct = 'abcdef';
 
6
 
 
7
$t = $x[] = 'x';
 
8
 
 
9
var_dump($correct);
 
10
var_dump($wrong);
 
11
 
 
12
$correct{1} = '*';
 
13
$correct{3} = '*';
 
14
$correct{5} = '*';
 
15
 
 
16
// This produces the 
 
17
$wrong{1} = $wrong{3} = $wrong{5} = '*';
 
18
 
 
19
var_dump($correct);
 
20
var_dump($wrong);
 
21
 
 
22
?>
 
23
--EXPECT--
 
24
string(6) "abcdef"
 
25
string(6) "abcdef"
 
26
string(6) "a*c*e*"
 
27
string(6) "a*c*e*"