mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Trim trailing whitespace in tests
This commit is contained in:
@@ -44,7 +44,7 @@ var_dump(func_num_args());
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
int(0)
|
||||
int(1)
|
||||
Exception: Too few arguments to function test2(), 0 passed in %s001.php on line 18 and exactly 1 expected
|
||||
|
||||
@@ -50,7 +50,7 @@ var_dump(func_get_arg(1));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: func_get_arg(): The argument number should be >= 0 in %s on line %d
|
||||
bool(false)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ var_dump(func_get_args());
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
array(0) {
|
||||
}
|
||||
array(1) {
|
||||
|
||||
@@ -12,7 +12,7 @@ var_dump(strncmp("qwerty", "qwerty123", 7));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: strncmp() expects exactly 3 parameters, 2 given in %s on line %d
|
||||
NULL
|
||||
int(0)
|
||||
|
||||
@@ -14,7 +14,7 @@ var_dump(strcasecmp("01", "01"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: strcasecmp() expects exactly 2 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
int(0)
|
||||
|
||||
@@ -15,7 +15,7 @@ var_dump(strncasecmp("01", "01", 1000));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: strncasecmp() expects exactly 3 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ var_dump(each($a));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: each() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ var_dump(constant("test const"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: define() expects at least 2 parameters, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ $f1->testNull();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Deprecated: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
string(3) "foo"
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ var_dump(get_parent_class(1));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
string(3) "foo"
|
||||
|
||||
@@ -52,7 +52,7 @@ $bar->test();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: property_exists() expects exactly 2 parameters, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ var_dump(class_exists("stdClass"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: class_exists() expects at least 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
|
||||
@@ -18,7 +18,7 @@ var_dump(interface_exists("stdClass"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: interface_exists() expects at least 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
|
||||
@@ -20,7 +20,7 @@ var_dump(get_included_files());
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(%d) "%s"
|
||||
|
||||
@@ -13,7 +13,7 @@ var_dump(trigger_error("error", E_USER_DEPRECATED));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: trigger_error() expects at least 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ isset() with object properties when operating on non-object
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$foo = NULL;
|
||||
$foo = NULL;
|
||||
isset($foo->bar->bar);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
Done
|
||||
|
||||
@@ -43,7 +43,7 @@ var_dump(count(get_extension_funcs("zend")));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ var_dump(constant("TEST_CONST2"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: constant() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ echo "*** Testing unset(), empty() & isset() with scalar variables ***\n";
|
||||
|
||||
// testing scalar variables
|
||||
$scalar_variables = array(
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
+1
|
||||
-1,
|
||||
@@ -52,23 +52,23 @@ foreach ($scalar_variables as $scalar_var) {
|
||||
echo "-- Iteration $loop_counter --\n"; $loop_counter++;
|
||||
|
||||
// checking with isset before unsetting, expected: bool(true)
|
||||
var_dump( isset($scalar_var) );
|
||||
var_dump( isset($scalar_var, $set_var) );
|
||||
var_dump( isset($scalar_var) );
|
||||
var_dump( isset($scalar_var, $set_var) );
|
||||
// checking if the var is empty, expected: bool(false) on most
|
||||
// except "", 0, "0", NULL, FALSE
|
||||
var_dump( empty($scalar_var) );
|
||||
|
||||
var_dump( empty($scalar_var) );
|
||||
|
||||
// destroy the variable using unset
|
||||
unset( $scalar_var );
|
||||
unset( $scalar_var );
|
||||
// dump and see if its destroyed, expcted: NULL
|
||||
var_dump( $scalar_var );
|
||||
var_dump( $scalar_var );
|
||||
|
||||
// check using isset to see if unset, expected: bool(false)
|
||||
var_dump( isset($scalar_var) );
|
||||
var_dump( isset($scalar_var, $set_var) );
|
||||
var_dump( isset($scalar_var) );
|
||||
var_dump( isset($scalar_var, $set_var) );
|
||||
|
||||
// empty to check if empty, expecting bool(true)
|
||||
var_dump( empty($scalar_var) );
|
||||
var_dump( empty($scalar_var) );
|
||||
|
||||
// isset() with two args, one arg only unset, expected: bool(false)
|
||||
var_dump( isset($scalar_var, $set_var) );
|
||||
@@ -90,16 +90,16 @@ $array_variables = array(
|
||||
array(1 => "One", 2 => "two"),
|
||||
array("Name" => "Jack", "Age" => "30"),
|
||||
array(1,2, "One" => "1", 2 => "two", ""=>"empty", "" => '')
|
||||
);
|
||||
);
|
||||
|
||||
$outer_loop_counter = 1;
|
||||
foreach ($array_variables as $array_var) {
|
||||
echo "--- Outerloop Iteration $outer_loop_counter ---\n";
|
||||
|
||||
|
||||
// check the isset and unset on non existing key
|
||||
$var = 1; // a var which is defined
|
||||
// try to unset the element which is non-existent
|
||||
unset($array_var['non_existent']);
|
||||
unset($array_var['non_existent']);
|
||||
// check using isset() & empty() on a non_existent element in the array
|
||||
var_dump( isset($array_var['non_existent']) );
|
||||
var_dump( isset($array_var['non_existent'], $var) );
|
||||
@@ -115,11 +115,11 @@ foreach ($array_variables as $array_var) {
|
||||
// unset each element in the array and see the working of unset, isset & empty
|
||||
$inner_loop_counter = 1;
|
||||
foreach ($keys as $key_value) {
|
||||
echo "-- Innerloop Iteration $inner_loop_counter of Outerloop Iteration $outer_loop_counter --\n";
|
||||
echo "-- Innerloop Iteration $inner_loop_counter of Outerloop Iteration $outer_loop_counter --\n";
|
||||
$inner_loop_counter++;
|
||||
|
||||
// unset the element
|
||||
unset($array_var[$key_value]);
|
||||
unset($array_var[$key_value]);
|
||||
// dump the array after element was unset
|
||||
var_dump($array_var);
|
||||
// check using isset for the element that was unset
|
||||
@@ -127,7 +127,7 @@ foreach ($array_variables as $array_var) {
|
||||
// calling isset with more args
|
||||
var_dump( isset($array_var[$key_val], $array_var) ); //expected: bool(false)
|
||||
|
||||
// calling empty, expected bool(true)
|
||||
// calling empty, expected bool(true)
|
||||
var_dump( empty($array_var[$key_val]) );
|
||||
|
||||
// dump the array to see that that array did not get modified
|
||||
@@ -144,7 +144,7 @@ foreach ($array_variables as $array_var) {
|
||||
// use isset to see that array is not set
|
||||
var_dump( isset($array_var) ); //expected: bool(false)
|
||||
var_dump( isset($array_var, $array_var[$key_val]) ); // expected: bool(false)
|
||||
|
||||
|
||||
// empty() to see if the array is empty
|
||||
var_dump( empty($array_var) ); // expected: bool(true)
|
||||
}
|
||||
@@ -183,7 +183,7 @@ foreach ($resources as $resource) {
|
||||
unset($temp_var);
|
||||
// now the isset() with both the args as unset
|
||||
var_dump( isset($resource, $temp_var) ); // expected: bool(false);
|
||||
|
||||
|
||||
// dump the resource to see if there any effect on it
|
||||
var_dump($resource);
|
||||
}
|
||||
@@ -200,12 +200,12 @@ class Point
|
||||
var $x;
|
||||
var $y;
|
||||
var $lable;
|
||||
|
||||
|
||||
function __construct($x, $y) {
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
}
|
||||
|
||||
|
||||
function setLable($lable) {
|
||||
$this->lable = $lable;
|
||||
}
|
||||
@@ -281,25 +281,25 @@ echo "\n*** Testing possible variation in operation for isset(), empty() & unset
|
||||
echo "\n** Testing unset() variation 1: unset on static variable inside a function **\n";
|
||||
function test_unset1() {
|
||||
static $static_var;
|
||||
|
||||
|
||||
// increment the value of the static. this change is in function context
|
||||
$static_var ++;
|
||||
|
||||
echo "value of static_var before unset: $static_var\n";
|
||||
|
||||
echo "value of static_var before unset: $static_var\n";
|
||||
// check using isset and empty
|
||||
var_dump( isset($static_var) );
|
||||
var_dump( empty($static_var) );
|
||||
|
||||
|
||||
// unset the static var
|
||||
unset($static_var);
|
||||
echo "value of static_var after unset: $static_var\n";
|
||||
echo "value of static_var after unset: $static_var\n";
|
||||
// check using isset and empty
|
||||
var_dump( isset($static_var) );
|
||||
var_dump( empty($static_var) );
|
||||
|
||||
// assign a value to static var
|
||||
$static_var = 20;
|
||||
echo "value of static_var after new assignment: $static_var\n";
|
||||
echo "value of static_var after new assignment: $static_var\n";
|
||||
}
|
||||
// call the functiont
|
||||
test_unset1();
|
||||
@@ -329,7 +329,7 @@ var_dump($value);
|
||||
test_unset2($value);
|
||||
var_dump($value);
|
||||
|
||||
|
||||
|
||||
echo "\n** Testing unset() variation 3: unset on a global variable inside of a function **\n";
|
||||
/* unset() variation2: unset on a global variable inside a function
|
||||
* If a globalized variable is unset() inside of a function, only the
|
||||
@@ -340,17 +340,17 @@ $global_var = 10;
|
||||
|
||||
function test_unset3() {
|
||||
global $global_var;
|
||||
|
||||
|
||||
// check the $global_var using isset and empty
|
||||
var_dump( isset($global_var) );
|
||||
var_dump( empty($global_var) );
|
||||
|
||||
var_dump( isset($global_var) );
|
||||
var_dump( empty($global_var) );
|
||||
|
||||
// unset the global var
|
||||
unset($global_var);
|
||||
|
||||
|
||||
// check the $global_var using isset and empty
|
||||
var_dump( isset($global_var) );
|
||||
var_dump( empty($global_var) );
|
||||
var_dump( isset($global_var) );
|
||||
var_dump( empty($global_var) );
|
||||
}
|
||||
|
||||
var_dump($global_var);
|
||||
|
||||
@@ -19,7 +19,7 @@ foo(1,2);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: func_get_arg() expects exactly 1 parameter, 3 given in %s on line %d
|
||||
NULL
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ class foo {
|
||||
public $test = 0;
|
||||
private $test_2 = 1;
|
||||
protected $test_3 = 2;
|
||||
|
||||
|
||||
public function bar() {
|
||||
try {
|
||||
throw new Exception('foo');
|
||||
@@ -15,13 +15,13 @@ class foo {
|
||||
var_dump($this);
|
||||
}
|
||||
|
||||
$this->baz();
|
||||
$this->baz();
|
||||
}
|
||||
|
||||
|
||||
public function baz() {
|
||||
foreach ($this as $k => $v) {
|
||||
printf("'%s' => '%s'\n", $k, $v);
|
||||
}
|
||||
}
|
||||
print "ok\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Testing array with '[]' passed as argument by value
|
||||
--FILE--
|
||||
<?php
|
||||
<?php
|
||||
|
||||
function test($var) { }
|
||||
test($arr[]);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Testing array with '[]' passed as argument by reference
|
||||
--FILE--
|
||||
<?php
|
||||
<?php
|
||||
|
||||
function test(&$var) { }
|
||||
test($arr[]);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Using undefined multidimensional array
|
||||
--FILE--
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$arr[1][2][3][4][5];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Testing multiples 'default:' in switch
|
||||
--FILE--
|
||||
<?php
|
||||
<?php
|
||||
|
||||
switch (1) {
|
||||
case 2:
|
||||
|
||||
@@ -649,7 +649,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -665,7 +665,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -681,7 +681,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -698,7 +698,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -714,7 +714,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -730,7 +730,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -746,7 +746,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -762,7 +762,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -778,7 +778,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -794,7 +794,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -810,7 +810,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -826,7 +826,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -842,7 +842,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -858,7 +858,7 @@ try {
|
||||
var_dump($e->getPrevious() === NULL);
|
||||
var_dump($e->getFile() === __FILE__);
|
||||
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -8,5 +8,5 @@ abstract class B extends A { abstract function bar($x); }
|
||||
|
||||
echo "DONE";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
DONE
|
||||
|
||||
@@ -8,5 +8,5 @@ abstract class B extends A { abstract function bar($x, $y = 0); }
|
||||
|
||||
echo "DONE";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
DONE
|
||||
|
||||
@@ -8,5 +8,5 @@ abstract class B extends A { abstract function bar($x); }
|
||||
|
||||
echo "DONE";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Fatal error: Declaration of B::bar($x) must be compatible with A::bar($x, $y = 0) in %s
|
||||
|
||||
@@ -10,5 +10,5 @@ class test {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Fatal error: Multiple access type modifiers are not allowed in %s on line %d
|
||||
|
||||
@@ -9,5 +9,5 @@ class test {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Fatal error: Multiple access type modifiers are not allowed in %s on line %d
|
||||
|
||||
@@ -9,5 +9,5 @@ final final class test {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Fatal error: Multiple final modifiers are not allowed in %s on line %d
|
||||
|
||||
@@ -10,5 +10,5 @@ class test {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Fatal error: Multiple abstract modifiers are not allowed in %s on line %d
|
||||
|
||||
@@ -10,5 +10,5 @@ class test {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Fatal error: Multiple final modifiers are not allowed in %s on line %d
|
||||
|
||||
@@ -10,5 +10,5 @@ class test {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Fatal error: Multiple static modifiers are not allowed in %s on line %d
|
||||
|
||||
@@ -9,5 +9,5 @@ class test {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use the final modifier on an abstract class member in %s on line %d
|
||||
|
||||
@@ -21,7 +21,7 @@ abstract class b extends a {
|
||||
class c extends b {
|
||||
public function __construct() {
|
||||
$this->test();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new c;
|
||||
|
||||
@@ -32,7 +32,7 @@ echo $a->func1(),"\n";
|
||||
echo $a->func2(),"\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
var1 value
|
||||
var2 value
|
||||
in func1
|
||||
|
||||
@@ -29,7 +29,7 @@ var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
|
||||
@@ -19,7 +19,7 @@ var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Notice: Object of class stdClass could not be converted to number in %sadd_002.php on line %d
|
||||
|
||||
Exception: Unsupported operand types
|
||||
|
||||
@@ -19,7 +19,7 @@ var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Notice: Object of class stdClass could not be converted to number in %sadd_003.php on line %d
|
||||
|
||||
Exception: Unsupported operand types
|
||||
|
||||
@@ -16,7 +16,7 @@ var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Exception: Unsupported operand types
|
||||
|
||||
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
|
||||
|
||||
@@ -16,7 +16,7 @@ var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
float(2834756759.1231)
|
||||
float(2834756759.1231)
|
||||
Done
|
||||
|
||||
@@ -37,7 +37,7 @@ var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
|
||||
Warning: A non-numeric value encountered in %s on line %d
|
||||
int(75636)
|
||||
|
||||
@@ -18,7 +18,7 @@ var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
|
||||
Warning: A non-numeric value encountered in %s on line %d
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ var_dump($s);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
string(3) "020"
|
||||
string(4) "pead"
|
||||
string(4) "pead"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--TEST--
|
||||
Testing calls to anonymous function
|
||||
--FILE--
|
||||
<?php
|
||||
<?php
|
||||
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
$a = create_function('', 'return '. $i .';');
|
||||
var_dump($a());
|
||||
|
||||
|
||||
$b = "\0lambda_". ($i + 1);
|
||||
var_dump($b());
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Testing anonymous function return as array key and accessing $GLOBALS
|
||||
--FILE--
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$test = create_function('$v', 'return $v;');
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Using throw $var with anonymous function return
|
||||
--FILE--
|
||||
<?php
|
||||
<?php
|
||||
|
||||
try {
|
||||
$a = create_function('', 'return new Exception("test");');
|
||||
|
||||
@@ -4,12 +4,12 @@ Bug #55719 (Argument restriction should come with a more specific error message)
|
||||
<?php
|
||||
Class Base {
|
||||
public function &test($foo, array $bar, $option = NULL, $extra = "lllllllllllllllllllllllllllllllllllllllllllllllllll") {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Sub extends Base {
|
||||
public function &test() {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -4,12 +4,12 @@ Bug #55719 (Argument restriction should come with a more specific error message)
|
||||
<?php
|
||||
Abstract Class Base {
|
||||
public function test($foo, array &$bar, $option = NULL, $extra = 3.141592653589793238462643383279502884197169399375105 ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Sub extends Base {
|
||||
public function test($foo, array &$bar) {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -7,12 +7,12 @@ class Foo {
|
||||
|
||||
Abstract Class Base {
|
||||
public function test(Foo $foo, array $bar, $option = NULL, $extra = "lllllllllllllllllllllllllllllllllllllllllllllllllll") {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Sub extends Base {
|
||||
public function test() {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -11,7 +11,7 @@ Abstract Class Base {
|
||||
|
||||
class Sub extends Base {
|
||||
public function test(Foo $foo, array $bar, $option = NULL, $extra = 0xffffff ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
@@ -4,7 +4,7 @@ Bug #55719 (Argument restriction should come with a more specific error message)
|
||||
<?php
|
||||
class Sub implements ArrayAccess {
|
||||
public function offsetSet() {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -4,12 +4,12 @@ Bug #60174 (Notice when array in method prototype error)
|
||||
<?php
|
||||
Abstract Class Base {
|
||||
public function test($foo, $extra = array("test")) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Sub extends Base {
|
||||
public function test($foo, $extra) {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -10,7 +10,7 @@ Ensure "undefined offset" notice formats message corectly when undefined key is
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Notice: Undefined offset: -1 in %s on line 3
|
||||
|
||||
Notice: Undefined offset: -1 in %s on line 4
|
||||
|
||||
@@ -20,5 +20,5 @@ $a->test();
|
||||
$a->test();
|
||||
echo "okey";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
okey
|
||||
|
||||
@@ -12,7 +12,7 @@ var_dump($var1);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
int(2)
|
||||
int(2)
|
||||
Done
|
||||
|
||||
@@ -12,7 +12,7 @@ var_dump($var1);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
string(1) "g"
|
||||
string(1) "g"
|
||||
Done
|
||||
|
||||
@@ -12,7 +12,7 @@ var_dump($var1);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
NULL
|
||||
NULL
|
||||
Done
|
||||
|
||||
@@ -15,7 +15,7 @@ var_dump($var2);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
string(5) "space"
|
||||
string(5) "space"
|
||||
string(5) "space"
|
||||
|
||||
@@ -3,7 +3,7 @@ Bug #18556 (Setting locale to 'tr_TR' lowercases class names)
|
||||
--FILE--
|
||||
<?php
|
||||
$g_lang = 'tr_TR';
|
||||
putenv("LANG=$g_lang");
|
||||
putenv("LANG=$g_lang");
|
||||
setlocale(LC_ALL, $g_lang);
|
||||
|
||||
class InfoBlob {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #21478 (Zend/zend_alloc.c :: shutdown_memory_manager produces segfault)
|
||||
Bug #21478 (Zend/zend_alloc.c :: shutdown_memory_manager produces segfault)
|
||||
--FILE--
|
||||
<?php
|
||||
class debugfilter extends php_user_filter {
|
||||
@@ -23,7 +23,7 @@ fwrite($fp, "This is a test.\n");
|
||||
print "Done.\n";
|
||||
fclose($fp);
|
||||
// Uncommenting the following 'print' line causes the segfault to stop occurring
|
||||
// print "2\n";
|
||||
// print "2\n";
|
||||
readfile(dirname(__FILE__)."/test.txt");
|
||||
unlink(dirname(__FILE__)."/test.txt");
|
||||
?>
|
||||
|
||||
@@ -8,19 +8,19 @@ class mom {
|
||||
|
||||
protected function prot() {
|
||||
print "protected method\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class child extends mom {
|
||||
|
||||
|
||||
public function callMom() {
|
||||
$this->prot();
|
||||
}
|
||||
|
||||
|
||||
public function viewMom() {
|
||||
print $this->prot;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$c = new child();
|
||||
|
||||
@@ -20,7 +20,7 @@ class SectionClass {
|
||||
}
|
||||
}
|
||||
function out($code) { return; }
|
||||
$site = new SiteClass();
|
||||
$site = new SiteClass();
|
||||
$site->page->Display();
|
||||
echo "OK\n";
|
||||
?>
|
||||
|
||||
@@ -5,7 +5,7 @@ Bug #26229 (getIterator() segfaults when it returns arrays or scalars)
|
||||
|
||||
class array_iterator implements IteratorAggregate {
|
||||
public function getIterator() {
|
||||
return array('foo', 'bar');
|
||||
return array('foo', 'bar');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ $function();
|
||||
class foo
|
||||
{
|
||||
static $method = 'global_func';
|
||||
|
||||
|
||||
static public function foo_func()
|
||||
{
|
||||
echo __METHOD__ . "\n";
|
||||
|
||||
@@ -14,7 +14,7 @@ class Staticexample
|
||||
$b = new Staticexample();
|
||||
Staticexample::test();
|
||||
$b->test();
|
||||
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
|
||||
@@ -8,7 +8,7 @@ class Base
|
||||
public $Foo = 1;
|
||||
protected $Bar = 2;
|
||||
private $Baz = 3;
|
||||
|
||||
|
||||
function __construct()
|
||||
{
|
||||
echo __METHOD__ . "\n";
|
||||
|
||||
@@ -4,8 +4,8 @@ Bug #28072 (static array with some constant keys will be incorrectly ordered)
|
||||
<?php
|
||||
define("FIRST_KEY", "a");
|
||||
define("THIRD_KEY", "c");
|
||||
|
||||
|
||||
|
||||
|
||||
function test()
|
||||
{
|
||||
static $arr = array(
|
||||
@@ -16,7 +16,7 @@ function test()
|
||||
);
|
||||
print_r($arr);
|
||||
}
|
||||
|
||||
|
||||
function test2()
|
||||
{
|
||||
static $arr = array(
|
||||
@@ -27,7 +27,7 @@ function test2()
|
||||
);
|
||||
print_r($arr);
|
||||
}
|
||||
|
||||
|
||||
test();
|
||||
test2();
|
||||
?>
|
||||
|
||||
@@ -8,14 +8,14 @@ function doit($a, $b)
|
||||
custom_callback('dereferenced', $trace);
|
||||
custom_callback('direct', debug_backtrace());
|
||||
}
|
||||
|
||||
|
||||
function custom_callback($traceName, $btInfo)
|
||||
{
|
||||
echo $traceName ." -- args: ";
|
||||
echo isset($btInfo[0]['args']) ? count($btInfo[0]['args']) : 'does not exist';
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
|
||||
doit('a','b');
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
@@ -3,15 +3,15 @@ Bug #29104 (Function declaration in method doesn't work)
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
{
|
||||
function g()
|
||||
{
|
||||
{
|
||||
function g()
|
||||
{
|
||||
echo "function g - begin\n";
|
||||
|
||||
function f()
|
||||
{
|
||||
|
||||
function f()
|
||||
{
|
||||
echo "function f\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "function g - end\n";
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ Bug #29674 (inherited method doesn't have access to private variables of the der
|
||||
class BaseClass
|
||||
{
|
||||
private $private_base = "Base";
|
||||
|
||||
|
||||
function printVars ()
|
||||
{
|
||||
var_dump($this->private_base);
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
Bug #30080 (Passing array or non array of objects)
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {
|
||||
function __construct($arrayobj) {
|
||||
class foo {
|
||||
function __construct($arrayobj) {
|
||||
var_dump($arrayobj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new foo(array(new stdClass));
|
||||
new foo(array(new stdClass));
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
|
||||
@@ -18,7 +18,7 @@ class hariCow extends FIIFO {
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function __toString() {
|
||||
return "ok\n";
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class hariCow extends FIIFO {
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function __toString() {
|
||||
return "Rusticus in asino sedet.";
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Bug #30346 (arrayAccess and using $this)
|
||||
|
||||
class Test implements ArrayAccess
|
||||
{
|
||||
public function __construct() { }
|
||||
public function __construct() { }
|
||||
public function offsetExists( $offset ) { return false; }
|
||||
public function offsetGet( $offset ) { return $offset; }
|
||||
public function offsetSet( $offset, $data ) { }
|
||||
|
||||
@@ -8,12 +8,12 @@ class Container
|
||||
{
|
||||
return $this->_p[ $what ];
|
||||
}
|
||||
|
||||
|
||||
public function __set( $what, $value )
|
||||
{
|
||||
$this->_p[ $what ] = $value;
|
||||
}
|
||||
|
||||
|
||||
private $_p = array();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Bug #30451 (static properties permissions broken)
|
||||
class A {
|
||||
|
||||
protected static $property = TRUE;
|
||||
|
||||
|
||||
protected static function method() {
|
||||
return TRUE;
|
||||
}
|
||||
@@ -16,15 +16,15 @@ class A {
|
||||
class B extends A {
|
||||
|
||||
public function __construct() {
|
||||
|
||||
|
||||
var_dump(self::method());
|
||||
var_dump(parent::method());
|
||||
|
||||
|
||||
var_dump(self::$property);
|
||||
var_dump(parent::$property);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
new B;
|
||||
|
||||
@@ -14,7 +14,7 @@ class C {
|
||||
}
|
||||
}
|
||||
|
||||
function plap($a) {
|
||||
function plap($a) {
|
||||
}
|
||||
|
||||
function plop() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #30725 (PHP segfaults when an exception is thrown in getIterator() within foreach)
|
||||
--FILE--
|
||||
<?php
|
||||
<?php
|
||||
|
||||
class Test implements IteratorAggregate
|
||||
{
|
||||
@@ -12,7 +12,7 @@ class Test implements IteratorAggregate
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
{
|
||||
$it = new Test;
|
||||
foreach($it as $v)
|
||||
{
|
||||
|
||||
@@ -3,14 +3,14 @@ Bug #30998 (Crash when user error handler returns false)
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(-1);
|
||||
|
||||
|
||||
function my_error($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
print "$errstr ($errno) in $errfile:$errline\n";
|
||||
return false;
|
||||
}
|
||||
set_error_handler('my_error');
|
||||
|
||||
|
||||
$f = fopen("/tmp/blah", "r");
|
||||
?>
|
||||
===DONE===
|
||||
|
||||
@@ -7,7 +7,7 @@ class DbGow {
|
||||
public function query() {
|
||||
throw new Exception;
|
||||
}
|
||||
|
||||
|
||||
public function select() {
|
||||
return new DbGowRecordSet($this->query());
|
||||
}
|
||||
@@ -32,7 +32,7 @@ try {
|
||||
} catch(Exception $e) {
|
||||
echo "ok\n";
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
$db->select2();
|
||||
} catch(Exception $e) {
|
||||
|
||||
@@ -6,42 +6,42 @@ Bug #31683 (changes to $name in __get($name) override future parameters)
|
||||
class Foo implements ArrayAccess {
|
||||
|
||||
function __get($test) {
|
||||
var_dump($test);
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
function __set($test, $val) {
|
||||
var_dump($test);
|
||||
var_dump($test);
|
||||
var_dump($val);
|
||||
$test = 'bug';
|
||||
$val = 'bug';
|
||||
}
|
||||
|
||||
function __call($test, $arg) {
|
||||
var_dump($test);
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
function offsetget($test) {
|
||||
var_dump($test);
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
return 123;
|
||||
}
|
||||
|
||||
function offsetset($test, $val) {
|
||||
var_dump($test);
|
||||
var_dump($val);
|
||||
var_dump($test);
|
||||
var_dump($val);
|
||||
$test = 'bug';
|
||||
$val = 'bug';
|
||||
}
|
||||
|
||||
function offsetexists($test) {
|
||||
var_dump($test);
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
function offsetunset($test) {
|
||||
var_dump($test);
|
||||
var_dump($test);
|
||||
$test = 'bug';
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ class test
|
||||
{
|
||||
private static $instance = null;
|
||||
private $myname = '';
|
||||
|
||||
private function __construct( $value = '' )
|
||||
|
||||
private function __construct( $value = '' )
|
||||
{
|
||||
echo "New class $value created \n";
|
||||
$this -> myname = $value;
|
||||
@@ -38,7 +38,7 @@ class test
|
||||
}
|
||||
return $instance2;
|
||||
}
|
||||
public function __destruct()
|
||||
public function __destruct()
|
||||
{
|
||||
if ( defined('SCRIPT_END') )
|
||||
{
|
||||
@@ -47,7 +47,7 @@ class test
|
||||
echo "Class " . $this -> myname . " destroyed beforce script end\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "Try static instance inside class :\n";
|
||||
$getCopyofSingleton = test::getInstance();
|
||||
$getCopyofSingleton = null;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--TEST--
|
||||
Bug #32428 (The @ warning error suppression operator is broken)
|
||||
--FILE--
|
||||
<?php
|
||||
$data = @$not_exists;
|
||||
$data = @($not_exists);
|
||||
$data = @!$not_exists;
|
||||
$data = !@$not_exists;
|
||||
$data = @($not_exists+1);
|
||||
<?php
|
||||
$data = @$not_exists;
|
||||
$data = @($not_exists);
|
||||
$data = @!$not_exists;
|
||||
$data = !@$not_exists;
|
||||
$data = @($not_exists+1);
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
@@ -4,7 +4,7 @@ Bug #32596 (Segfault/Memory Leak by getClass (etc) in __destruct)
|
||||
<?php
|
||||
class BUG {
|
||||
public $error = "please fix this thing, it wasted a nice part of my life!\n";
|
||||
static function instance() {return new BUG();}
|
||||
static function instance() {return new BUG();}
|
||||
|
||||
function __destruct()
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ try {
|
||||
//irrelevant
|
||||
}
|
||||
echo 'shouldn`t get here';
|
||||
//$dummy = 'this will not crash';
|
||||
//$dummy = 'this will not crash';
|
||||
$obj->dummy = 'this will crash';
|
||||
} catch (Exception $e) {
|
||||
echo "ok\n";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #32833 (Invalid opcode with $a[] .= '')
|
||||
--FILE--
|
||||
<?php
|
||||
<?php
|
||||
$test = array();
|
||||
$test[] .= "ok\n";
|
||||
echo $test[0];
|
||||
|
||||
@@ -10,7 +10,7 @@ class A
|
||||
class B extends A
|
||||
{
|
||||
private $c = "B's c";
|
||||
|
||||
|
||||
public function go()
|
||||
{
|
||||
foreach ($this as $key => $val)
|
||||
|
||||
@@ -7,20 +7,20 @@ class foo {
|
||||
echo "private!\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class fooson extends foo {
|
||||
function barson() {
|
||||
$this->bar();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class foo2son extends fooson {
|
||||
|
||||
|
||||
function bar() {
|
||||
echo "public!\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$b = new foo2son();
|
||||
$b->barson();
|
||||
?>
|
||||
|
||||
@@ -8,7 +8,7 @@ Bug #33282 (Re-assignment by reference does not clear the is_ref flag)
|
||||
$r = &$a[2];
|
||||
var_dump($a);
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
|
||||
@@ -41,7 +41,7 @@ class TheObj {
|
||||
|
||||
var_dump($SomeObj->RealVar1);
|
||||
print $SomeObj->{'RealVar'.(3)}."\n";
|
||||
|
||||
|
||||
unset($SomeObj->RealVar1);
|
||||
unset($SomeObj->{'RealVar'.(3)});
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@ class Foo implements ArrayAccess
|
||||
function offsetGet($offset) {/*...*/}
|
||||
function offsetSet($offset, $value) {/*...*/}
|
||||
function offsetUnset($offset) {/*...*/}
|
||||
|
||||
|
||||
function fail()
|
||||
{
|
||||
$this['blah'];
|
||||
}
|
||||
|
||||
|
||||
function succeed()
|
||||
{
|
||||
$this;
|
||||
|
||||
@@ -33,7 +33,7 @@ var_dump(error_reporting());
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
int(32767)
|
||||
int(32767)
|
||||
int(30719)
|
||||
|
||||
@@ -16,7 +16,7 @@ class Faulty
|
||||
|
||||
function NormalMethod($Args)
|
||||
{
|
||||
echo "I heart me\n";
|
||||
echo "I heart me\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ class abc {
|
||||
function __set ($key, $value) {
|
||||
$this->arr[$key] = $value;
|
||||
}
|
||||
|
||||
|
||||
function __get ($key) {
|
||||
return $this->arr[$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
$abc = new abc();
|
||||
foreach (array (1,2,3) as $abc->k => $abc->v) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #34617 (zend_deactivate: objects_store used after zend_objects_store_destroy is called)
|
||||
Bug #34617 (zend_deactivate: objects_store used after zend_objects_store_destroy is called)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("xml")) print "skip the xml extension not available"; ?>
|
||||
--FILE--
|
||||
|
||||
@@ -22,6 +22,6 @@ $myPwa->test();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECT--
|
||||
string(7) "myvalue"
|
||||
Done
|
||||
|
||||
@@ -10,7 +10,7 @@ try {
|
||||
echo "0\n";
|
||||
}
|
||||
echo "?\n";
|
||||
} catch(Exception $e) {
|
||||
} catch(Exception $e) {
|
||||
echo "This Exception should be caught\n";
|
||||
}
|
||||
function errorHandler($errno, $errstr, $errfile, $errline, $vars) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user