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

« back to all changes in this revision

Viewing changes to ext/standard/tests/strings/bug22904.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 #22904 (magic mode failed for cybase with '\0')
 
3
--FILE--
 
4
not active yet
 
5
<?php
 
6
 
 
7
/*
 
8
ini_set("magic_quotes_sybase","on");
 
9
test();
 
10
ini_set("magic_quotes_sybase","off");
 
11
test();
 
12
*/
 
13
function test(){
 
14
        $buf = 'g\g"\0g'."'";
 
15
        $slashed = addslashes($buf);
 
16
        echo "$buf\n";
 
17
        echo "$slashed\n";
 
18
        echo stripslashes($slashed."\n");
 
19
/*
 
20
g\g"\0g'
 
21
g\\g"\\0g''
 
22
g\g"\0g'
 
23
g\g"\0g'
 
24
g\\g\"\\0g\'
 
25
g\g"\0g'
 
26
*/
 
27
}
 
28
?>
 
29
--EXPECT--
 
30
not active yet