forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: NEWS UPGRADING
- Loading branch information
Showing
92 changed files
with
2,781 additions
and
1,670 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
PHP NEWS | ||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | ||
<<<<<<< HEAD | ||
?? ??? 20??, PHP 5.7.0 | ||
|
||
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--TEST-- | ||
Bug #65969 (Chain assignment with T_LIST failure) | ||
--FILE-- | ||
<?php | ||
$obj = new stdClass; | ||
list($a,$b) = $obj->prop = [1,2]; | ||
var_dump($a,$b); | ||
--EXPECT-- | ||
int(1) | ||
int(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--TEST-- | ||
Class Property Expressions | ||
--FILE-- | ||
<?php | ||
class Foo { | ||
const BAR = 1 << 0; | ||
const BAZ = 1 << 1; | ||
public $bar = self::BAR | self::BAZ; | ||
} | ||
echo (new Foo)->bar; | ||
?> | ||
--EXPECTF-- | ||
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
Static Class Property Expressions | ||
--FILE-- | ||
<?php | ||
class Foo { | ||
public $b1 = 1 + 1; | ||
public $b2 = 1 << 2; | ||
public $b3 = "foo " . " bar " . " baz"; | ||
} | ||
$f = new Foo; | ||
var_dump( | ||
$f->b1, | ||
$f->b2, | ||
$f->b3 | ||
); | ||
?> | ||
--EXPECT-- | ||
int(2) | ||
int(4) | ||
string(13) "foo bar baz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--TEST-- | ||
Constant Expressions | ||
--FILE-- | ||
<?php | ||
const T_1 = 1 << 1; | ||
const T_2 = 1 / 2; | ||
const T_3 = 1.5 + 1.5; | ||
const T_4 = "foo" . "bar"; | ||
const T_5 = (1.5 + 1.5) * 2; | ||
const T_6 = "foo" . 2 . 3 . 4.0; | ||
const T_7 = __LINE__; | ||
const T_8 = <<<ENDOFSTRING | ||
This is a test string | ||
ENDOFSTRING; | ||
const T_9 = ~-1; | ||
const T_10 = (-1?:1) + (0?2:3); | ||
const T_11 = 1 && 0; | ||
const T_12 = 1 and 1; | ||
const T_13 = 0 || 0; | ||
const T_14 = 1 or 0; | ||
const T_15 = 1 xor 1; | ||
const T_16 = 1 xor 0; | ||
const T_17 = 1 < 0; | ||
const T_18 = 0 <= 0; | ||
const T_19 = 1 > 0; | ||
const T_20 = 1 >= 0; | ||
const T_21 = 1 === 1; | ||
const T_22 = 1 !== 1; | ||
const T_23 = 0 != "0"; | ||
const T_24 = 1 == "1"; | ||
|
||
// Test order of operations | ||
const T_25 = 1 + 2 * 3; | ||
|
||
// Test for memory leaks | ||
const T_26 = "1" + 2 + "3"; | ||
|
||
var_dump(T_1); | ||
var_dump(T_2); | ||
var_dump(T_3); | ||
var_dump(T_4); | ||
var_dump(T_5); | ||
var_dump(T_6); | ||
var_dump(T_7); | ||
var_dump(T_8); | ||
var_dump(T_9); | ||
var_dump(T_10); | ||
var_dump(T_11); | ||
var_dump(T_12); | ||
var_dump(T_13); | ||
var_dump(T_14); | ||
var_dump(T_15); | ||
var_dump(T_16); | ||
var_dump(T_17); | ||
var_dump(T_18); | ||
var_dump(T_19); | ||
var_dump(T_20); | ||
var_dump(T_21); | ||
var_dump(T_22); | ||
var_dump(T_23); | ||
var_dump(T_24); | ||
var_dump(T_25); | ||
var_dump(T_26); | ||
?> | ||
--EXPECT-- | ||
int(2) | ||
float(0.5) | ||
float(3) | ||
string(6) "foobar" | ||
float(6) | ||
string(6) "foo234" | ||
int(8) | ||
string(21) "This is a test string" | ||
int(0) | ||
int(2) | ||
bool(false) | ||
bool(true) | ||
bool(false) | ||
bool(true) | ||
bool(false) | ||
bool(true) | ||
bool(false) | ||
bool(true) | ||
bool(true) | ||
bool(true) | ||
bool(true) | ||
bool(false) | ||
bool(false) | ||
bool(true) | ||
int(7) | ||
int(6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--TEST-- | ||
Dynamic Constant Expressions | ||
--FILE-- | ||
<?php | ||
const FOO = 1; | ||
const BAR = FOO | 2; | ||
|
||
echo BAR; | ||
?> | ||
--EXPECTF-- | ||
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--TEST-- | ||
Function Argument Parsing #003 | ||
--FILE-- | ||
<?php | ||
const a = 10; | ||
|
||
function t1($a = 1 + 1, $b = 1 << 2, $c = "foo" . "bar", $d = a * 10) { | ||
var_dump($a, $b, $c, $d); | ||
} | ||
|
||
t1(); | ||
?> | ||
--EXPECT-- | ||
int(2) | ||
int(4) | ||
string(6) "foobar" | ||
int(100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--TEST-- | ||
Bug #66041: list() fails to unpack yielded ArrayAccess object | ||
--FILE-- | ||
<?php | ||
function dumpElement() { | ||
list($value) = yield; | ||
var_dump($value); | ||
}; | ||
|
||
$fixedArray = new SplFixedArray(1); | ||
$fixedArray[0] = 'the element'; | ||
|
||
$generator = dumpElement(); | ||
$generator->send($fixedArray); | ||
?> | ||
--EXPECT-- | ||
string(11) "the element" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--TEST-- | ||
Static Variable Expressions | ||
--FILE-- | ||
<?php | ||
const bar = 2, baz = bar + 1; | ||
|
||
function foo() { | ||
static $a = 1 + 1; | ||
static $b = [bar => 1 + 1, baz * 2 => 1 << 2]; | ||
static $c = [1 => bar, 3 => baz]; | ||
var_dump($a, $b, $c); | ||
} | ||
|
||
foo(); | ||
?> | ||
--EXPECT-- | ||
int(2) | ||
array(2) { | ||
[2]=> | ||
int(2) | ||
[6]=> | ||
int(4) | ||
} | ||
array(2) { | ||
[1]=> | ||
int(2) | ||
[3]=> | ||
int(3) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.