Commit c785001d authored by Sean Finney's avatar Sean Finney

Imported Upstream version 5.2.10.dfsg.1

parent cd0b49c7

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
...@@ -32,11 +32,12 @@ sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB] ...@@ -32,11 +32,12 @@ sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB]
[Which "php" executable "make test" look for] [Which "php" executable "make test" look for]
--------------------------------------------- ---------------------------------------------
You must use TEST_PHP_EXECUTABLE environment variable to explicitly If you are running the run-tests.php script from the command line (as above)
select the php executable to be used to run the tests. That can either you must set the TEST_PHP_EXECUTABLE environment variable to explicitly
be the CLI or CGI executable. select the PHP executable that is to be tested, that is, used to run the test scripts.
"make test" executes "run-tests.php" script with "php" binary. Some If you run the tests using make test, the PHP CLI and CGI executables are
automatically set for you. "make test" executes "run-tests.php" script with the CLI binary. Some
test scripts such as session must be executed by CGI SAPI. Therefore, test scripts such as session must be executed by CGI SAPI. Therefore,
you must build PHP with CGI SAPI to perform all tests. you must build PHP with CGI SAPI to perform all tests.
......
// $Header: /repository/ZendEngine2/Attic/FlexLexer.h,v 1.4 2000/07/03 00:55:36 sascha Exp $ // $Header: /repository/ZendEngine2/Attic/FlexLexer.h,v 1.4.18.1 2009/04/27 19:54:34 felipe Exp $
// FlexLexer.h -- define interfaces for lexical analyzer classes generated // FlexLexer.h -- define interfaces for lexical analyzer classes generated
// by flex // by flex
......
/* A Lexical scanner generated by flex */ /* A Lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /repository/ZendEngine2/Attic/flex.skl,v 1.31 2003/08/11 05:24:41 fujimoto Exp $ * $Header: /repository/ZendEngine2/Attic/flex.skl,v 1.31.6.1 2009/04/27 19:54:34 felipe Exp $
* vim:ft=lex: * vim:ft=lex:
*/ */
......
--TEST--
Bug #39018 (Error control operator '@' fails to suppress "Uninitialized string offset")
--FILE--
<?php
error_reporting(E_ALL);
$a = 'foo';
$a[11111111111];
$a = '';
$a[0];
print $a[0]; // 12
$a[-11111111111111111111111];
print $a[-11111111111111111111111]; // 16
$a[-0];
$x = 'test';
@$x[4];
@$y = $x[4];
@('a' == $x[4]);
$x[4] == 'a'; // 28
@$x[4] == 'a';
(@$x[4]) == 'a';
($x[4]) == 'a'; // 34
(@($x[4])) == 'a';
(($x[4])) == 'a'; // 38
@($x[4]) == 'a';
($x[4]) == 'a'; // 42
@($x[4] == 'a');
($x[4] == 'a'); // 46
$y = 'foobar';
$y[12.2];
print $y[12.2]; // 52
$y[3.5];
print $y[3.5]; // 56
print "\nDone\n";
?>
--EXPECTF--
Notice: Uninitialized string offset: 0 in %s on line 12
Notice: Uninitialized string offset: -%d in %s on line 16
Notice: Uninitialized string offset: 4 in %s on line 28
Notice: Uninitialized string offset: 4 in %s on line 34
Notice: Uninitialized string offset: 4 in %s on line 38
Notice: Uninitialized string offset: 4 in %s on line 42
Notice: Uninitialized string offset: 4 in %s on line 46
Notice: Uninitialized string offset: 12 in %s on line 52
b
Done
--TEST--
Bug #39018 [2] (Error control operator '@' fails to suppress "Uninitialized string offset")
--FILE--
<?php
error_reporting(E_ALL);
$foo = 'test';
$x = @$foo[6];
print @($foo[100] + $foo[130]);
print "\nDone\n";
?>
--EXPECT--
0
Done
...@@ -6,4 +6,6 @@ Bug #39304 (Segmentation fault with list unpacking of string offset) ...@@ -6,4 +6,6 @@ Bug #39304 (Segmentation fault with list unpacking of string offset)
list($a, $b) = $s[0]; list($a, $b) = $s[0];
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Cannot use string offset as an array in %sbug39304.php on line 3 Notice: Uninitialized string offset: 0 in %s on line %d
Fatal error: Cannot use string offset as an array in %sbug39304.php on line %d
...@@ -8,4 +8,6 @@ $foo[3]->bar[1] = "bang"; ...@@ -8,4 +8,6 @@ $foo[3]->bar[1] = "bang";
echo "ok\n"; echo "ok\n";
?> ?>
--EXPECTF-- --EXPECTF--
Notice: Uninitialized string offset: 3 in %s on line %d
Fatal error: Cannot use string offset as an object in %sbug41919.php on line %d Fatal error: Cannot use string offset as an object in %sbug41919.php on line %d
--TEST--
bug #42143 (The constant NAN is reported as 0 on Windows build)
--CREDITS--
Venkat Raman Don
--FILE--
<?php
echo "Testing NAN:\n";
echo "NAN= ";
var_dump(NAN);
var_dump(tan(-1) == 123);
var_dump(cos(-100) == "PHP String");
var_dump(deg2rad(-5.6) == null);
var_dump(sqrt(-0.1) == false);
var_dump(sqrt(cos(M_PI)) == 0.1);
var_dump(NAN);
var_dump(is_nan(sqrt(-1.005)) == false);
var_dump(is_nan(floor(1)) == true);
var_dump(log10(-1) == log(-1));
var_dump(log10(-1) != log10(-1));
var_dump(is_finite(log10(-1)) == false);
var_dump(NAN == NAN);
?>
--EXPECT--
Testing NAN:
NAN= float(NAN)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
float(NAN)
bool(false)
bool(false)
bool(false)
bool(true)
bool(true)
bool(false)
--TEST--
Bug #45877 (Array key '2147483647' left as string)
--INI--
precision=20
--FILE--
<?php
$keys = array(PHP_INT_MAX,
(string) PHP_INT_MAX,
(string) (-PHP_INT_MAX - 1),
-PHP_INT_MAX - 1,
(string) (PHP_INT_MAX + 1));
var_dump(array_fill_keys($keys, 1));
?>
--EXPECTF--
array(3) {
[%d7]=>
int(1)
[-%d8]=>
int(1)
["%d8"]=>
int(1)
}
--TEST--
Bug #47704 (crashes on some "bad" operations with string offsets)
--FILE--
<?php
$s = "abd";
$s[0]->a += 1;
?>
--EXPECTF--
Fatal error: Cannot use string offset as an object in %sbug47704.php on line %d
--TEST--
Bug #47801 (__call() accessed via parent:: operator is provided incorrect method name)
--FILE--
<?php
class A
{
function __call($name, $args)
{
echo("magic method called: $name\n");
}
}
class B extends A
{
function getFoo()