mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-13 04:00:50 +00:00
Compare commits
202
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc766d7730 | ||
|
|
e720bc03b1 | ||
|
|
761cc2b766 | ||
|
|
564a161258 | ||
|
|
20d9ebc6fb | ||
|
|
81c25cd043 | ||
|
|
7864e31039 | ||
|
|
b47c49d7a0 | ||
|
|
f697874e3f | ||
|
|
0426b916df | ||
|
|
125578c636 | ||
|
|
6550f3ad7e | ||
|
|
478f119ab9 | ||
|
|
0484c6efe0 | ||
|
|
0d09b98ac4 | ||
|
|
b39310c715 | ||
|
|
63d116e571 | ||
|
|
e914abff1e | ||
|
|
3a1ae7bb9b | ||
|
|
b3889d4b20 | ||
|
|
cfd6e14842 | ||
|
|
ff4e330eae | ||
|
|
19b757dacd | ||
|
|
68ac602b28 | ||
|
|
ea6e54aff3 | ||
|
|
a6cdefe043 | ||
|
|
7f0de1a138 | ||
|
|
fa2125df67 | ||
|
|
4cc0286f2f | ||
|
|
d2298c3cec | ||
|
|
e1e5caf9d4 | ||
|
|
f12f0b2bc2 | ||
|
|
20c172d459 | ||
|
|
593b6cd0a8 | ||
|
|
b06fb88cf9 | ||
|
|
76a1d3f153 | ||
|
|
c019d33267 | ||
|
|
732f67ee6f | ||
|
|
9f4d05acec | ||
|
|
a8955926c2 | ||
|
|
19c4a2ef19 | ||
|
|
3e798c4a5f | ||
|
|
e077735b03 | ||
|
|
935b5cb11e | ||
|
|
4877641962 | ||
|
|
9f560baef5 | ||
|
|
a65ad951ad | ||
|
|
3c977618e1 | ||
|
|
8d2539fa0f | ||
|
|
1cda0d7c2f | ||
|
|
e5246580a8 | ||
|
|
16b3003ffc | ||
|
|
b28b8b2fee | ||
|
|
ca46d0acbc | ||
|
|
97e16ebbe2 | ||
|
|
432660f73f | ||
|
|
78675ebd9a | ||
|
|
d0fcc74110 | ||
|
|
88d1a2c5aa | ||
|
|
2ba3b27594 | ||
|
|
a8931df672 | ||
|
|
587497e3a9 | ||
|
|
d92606a4be | ||
|
|
f2f35a2b27 | ||
|
|
2d51267c07 | ||
|
|
92678d1a83 | ||
|
|
7f29e7c678 | ||
|
|
e926bf6507 | ||
|
|
ac1372d811 | ||
|
|
8823b68c41 | ||
|
|
25c96f92f4 | ||
|
|
3b2b080cbc | ||
|
|
c41826d1e6 | ||
|
|
5733fd1caf | ||
|
|
becda86ae5 | ||
|
|
3c6a2fb08c | ||
|
|
884e2a0519 | ||
|
|
9fb8ea58b5 | ||
|
|
eb33d08f1e | ||
|
|
88c1491c6d | ||
|
|
cf46ac1179 | ||
|
|
3e48baa49d | ||
|
|
c78fd4568e | ||
|
|
c1af9f282f | ||
|
|
eb636fcb56 | ||
|
|
58a945cf68 | ||
|
|
79e47aae41 | ||
|
|
0cd1c18853 | ||
|
|
fb98907d2d | ||
|
|
9afb05dcd1 | ||
|
|
158d11d53d | ||
|
|
9b65a10256 | ||
|
|
53c4c38878 | ||
|
|
576ed049c5 | ||
|
|
aeebae641e | ||
|
|
5004ae2b62 | ||
|
|
2f9e928af8 | ||
|
|
fa92a16e46 | ||
|
|
8bc3f179ce | ||
|
|
7c696fa886 | ||
|
|
0c9324ea9b | ||
|
|
577b081a20 | ||
|
|
5136048064 | ||
|
|
f99bf70360 | ||
|
|
d663296e3b | ||
|
|
4b2cc62e26 | ||
|
|
13fc1b92ca | ||
|
|
a881ea7d86 | ||
|
|
e15c418c4c | ||
|
|
7a8774ade4 | ||
|
|
3473b519c0 | ||
|
|
ee2625e252 | ||
|
|
1d80fb2cdb | ||
|
|
66ad7918b8 | ||
|
|
a4d6d16b3b | ||
|
|
60da307c61 | ||
|
|
ff6565462e | ||
|
|
73fb2192d2 | ||
|
|
13ffa88e1f | ||
|
|
dd77116fb0 | ||
|
|
3c8c347fa7 | ||
|
|
991ca7f7d7 | ||
|
|
7e12b5da71 | ||
|
|
fee5c049a8 | ||
|
|
c89306ac52 | ||
|
|
9b1430140a | ||
|
|
f2fc812b78 | ||
|
|
b04d60626d | ||
|
|
358bd77b23 | ||
|
|
183b4d78aa | ||
|
|
d7ce944cf1 | ||
|
|
1d59ed7524 | ||
|
|
6292fe84d3 | ||
|
|
266ecb6d0a | ||
|
|
a983b728a7 | ||
|
|
eddca73ad2 | ||
|
|
1eb3f01c68 | ||
|
|
69fbc751ff | ||
|
|
8e209d0435 | ||
|
|
10a2ceef3b | ||
|
|
46d708a1b6 | ||
|
|
ffc1ef1eed | ||
|
|
a8ec79e27f | ||
|
|
cf2496140d | ||
|
|
8f7325fc24 | ||
|
|
3c1a0d75bf | ||
|
|
68558ab71d | ||
|
|
2b70d44b57 | ||
|
|
dbf39cddd9 | ||
|
|
67d90a4870 | ||
|
|
fcaccbaa22 | ||
|
|
2252d4e59d | ||
|
|
7f22e3c879 | ||
|
|
b7b7dd8cea | ||
|
|
1cd566e13f | ||
|
|
043d8e2fe1 | ||
|
|
003346c450 | ||
|
|
d5a2af6d1c | ||
|
|
344ef050aa | ||
|
|
b73a3afff3 | ||
|
|
9a9ad56af0 | ||
|
|
970f21be97 | ||
|
|
c8778eb293 | ||
|
|
fe04f5494a | ||
|
|
36d02a36ae | ||
|
|
f1a9851c3e | ||
|
|
8856b3a63c | ||
|
|
1cb58ead70 | ||
|
|
5049ef2f1c | ||
|
|
54c04befc2 | ||
|
|
2a80758fd5 | ||
|
|
f9b158df07 | ||
|
|
28cf42568b | ||
|
|
343c056772 | ||
|
|
114277ed45 | ||
|
|
bc85678df3 | ||
|
|
58cdd03d92 | ||
|
|
5ee02b207d | ||
|
|
003727d851 | ||
|
|
8be94d46f8 | ||
|
|
bcc913fa8b | ||
|
|
bc979aee6d | ||
|
|
7f529e3dee | ||
|
|
a36dd1dfd8 | ||
|
|
c38f2c2a6b | ||
|
|
0fcb39dbaa | ||
|
|
6785ea2340 | ||
|
|
e19d263d81 | ||
|
|
f8a7676fc8 | ||
|
|
e715dafae0 | ||
|
|
5b88c61580 | ||
|
|
2d19c92fc2 | ||
|
|
f0f68c7274 | ||
|
|
9befad6fc2 | ||
|
|
13c45021dc | ||
|
|
189deb9fa3 | ||
|
|
3e45385903 | ||
|
|
df902a7c28 | ||
|
|
d26b8804d0 | ||
|
|
df683fa3b0 | ||
|
|
33721742a5 | ||
|
|
978832331a |
No files matched your search
@@ -0,0 +1,57 @@
|
||||
|
||||
version: "{branch}.build.{build}"
|
||||
|
||||
image: Visual Studio 2015
|
||||
|
||||
branches:
|
||||
except:
|
||||
- PHP-5.6
|
||||
- PHP-7.0
|
||||
|
||||
skip_commits:
|
||||
files:
|
||||
- NEWS
|
||||
- UPGRADING*
|
||||
- README.*
|
||||
|
||||
clone_depth: 64
|
||||
|
||||
cache:
|
||||
- c:\build-cache
|
||||
- c:\build-cache\sdk -> .appveyor.yml
|
||||
|
||||
environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.0beta1
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
#MYSQL_TEST_USER: root
|
||||
#PDO_MYSQL_TEST_DSN: "pgsql:host=127.0.0.1 port=5432 dbname=test user=root password=Password12!"
|
||||
#PDO_MYSQL_TEST_USER: root
|
||||
#PDO_MYSQL_TEST_PASS: Password12!
|
||||
#PGSQL_TEST_CONNSTR: "host=127.0.0.1 dbname=test port=5432 user=postgres password=Password12!"
|
||||
#PDO_PGSQL_TEST_DSN: "pgsql:host=127.0.0.1 port=5432 dbname=test user=postgres password=Password12!"
|
||||
#build permutations
|
||||
matrix:
|
||||
- THREAD_SAFE: 0
|
||||
OPCACHE: 0
|
||||
- THREAD_SAFE: 1
|
||||
OPCACHE: 1
|
||||
|
||||
services:
|
||||
# the setup scripts have to be touched, once some other db version is used
|
||||
- mysql
|
||||
- postgresql95
|
||||
|
||||
platform:
|
||||
- x64
|
||||
# - x86
|
||||
|
||||
build_script:
|
||||
- appveyor\build.bat
|
||||
|
||||
test_script:
|
||||
- appveyor\test.bat
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2016 The PHP Group. All rights reserved.
|
||||
Copyright (c) 1999 - 2017 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,97 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
19 Jan 2017 PHP 7.0.15
|
||||
|
||||
- Core:
|
||||
. Fixed bug #73792 (invalid foreach loop hangs script). (Dmitry)
|
||||
. Fixed bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created
|
||||
with list()). (Laruence)
|
||||
. Fixed bug #73585 (Logging of "Internal Zend error - Missing class
|
||||
information" missing class name). (Laruence)
|
||||
. Fixed bug #73753 (unserialized array pointer not advancing). (David Walker)
|
||||
. Fixed bug #73825 (Heap out of bounds read on unserialize in
|
||||
finish_nested_data()). (Stas)
|
||||
. Fixed bug #73831 (NULL Pointer Dereference while unserialize php object).
|
||||
(Stas)
|
||||
. Fixed bug #73832 (Use of uninitialized memory in unserialize()). (Stas)
|
||||
. Fixed bug #73092 (Unserialize use-after-free when resizing object's
|
||||
properties hash table). (Nikita)
|
||||
. Fixed bug #69425 (Use After Free in unserialize()). (Nikita)
|
||||
. Fixed bug #72731 (Type Confusion in Object Deserialization). (Nikita)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #73679 (DOTNET read access violation using invalid codepage).
|
||||
(Anatol)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #67474 (getElementsByTagNameNS filter on default ns). (aboks)
|
||||
|
||||
- EXIF:
|
||||
. Bug bug #73737 (FPE when parsing a tag format). (Stas)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #73869 (Signed Integer Overflow gd_io.c). (cmb)
|
||||
. Fixed bug #73868 (DOS vulnerability in gdImageCreateFromGd2Ctx()). (cmb)
|
||||
|
||||
- GMP:
|
||||
. Fixed bug #70513 (GMP Deserialization Type Confusion Vulnerability).
|
||||
(Nikita)
|
||||
|
||||
- Mysqli:
|
||||
. Fixed bug #73462 (Persistent connections don't set $connect_errno).
|
||||
(darkain)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed issue with decoding BIT columns when having more than one rows in the
|
||||
result set. 7.0+ problem. (Andrey)
|
||||
. Fixed bug #73800 (sporadic segfault with MYSQLI_OPT_INT_AND_FLOAT_NATIVE).
|
||||
(vanviegen)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #73612 (preg_*() may leak memory). (cmb)
|
||||
|
||||
- PDO_Firebird:
|
||||
. Fixed bug #72931 (PDO_FIREBIRD with Firebird 3.0 not work on returning
|
||||
statement). (Dorin Marcoci)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #73773 (Seg fault when loading hostile phar). (Stas)
|
||||
. Fixed bug #73768 (Memory corruption when loading hostile phar). (Stas)
|
||||
. Fixed bug #73764 (Crash while loading hostile phar archive). (Stas)
|
||||
|
||||
- Phpdbg:
|
||||
. Fixed bug #73615 (phpdbg without option never load .phpdbginit at startup).
|
||||
(Bob)
|
||||
. Fixed issue getting executable lines from custom wrappers. (Bob)
|
||||
. Fixed bug #73704 (phpdbg shows the wrong line in files with shebang). (Bob)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #46103 (ReflectionObject memory leak). (Nikita)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #73586 (php_user_filter::$stream is not set to the stream the
|
||||
filter is working on). (Dmitry)
|
||||
|
||||
- SQLite3:
|
||||
. Reverted fix for bug #73530 (Unsetting result set may reset other result
|
||||
set). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #73594 (dns_get_record does not populate $additional out
|
||||
parameter). (Bruce Weirdan)
|
||||
. Fixed bug #70213 (Unserialize context shared on double class lookup).
|
||||
(Taoguang Chen)
|
||||
. Fixed bug #73154 (serialize object with __sleep function crash). (Nikita)
|
||||
. Fixed bug #70490 (get_browser function is very slow). (Nikita)
|
||||
. Fixed bug #73265 (Loading browscap.ini at startup causes high memory usage).
|
||||
(Nikita)
|
||||
. Fixed bug #31875 (get_defined_functions additional param to exclude
|
||||
disabled functions). (willianveiga)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #73373 (deflate_add does not verify that output was not truncated).
|
||||
(Matt Bonneau)
|
||||
|
||||
08 Dec 2016 PHP 7.0.14
|
||||
|
||||
- Core:
|
||||
@@ -41,12 +133,12 @@ PHP NEWS
|
||||
. Fixed bug #73087, #61183, #71494 (Memory corruption in bindParam).
|
||||
(Dorin Marcoci)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #73580 (Phar::isValidPharFilename illegal memory access). (Stas)
|
||||
|
||||
- Postgres:
|
||||
. Fixed bug #73498 (Incorrect SQL generated for pg_copy_to()). (Craig Duncan)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #73580 (Phar::isValidPharFilename illegal memory access). (Stas)
|
||||
|
||||
- Soap:
|
||||
. Fixed bug #73538 (SoapClient::__setSoapHeaders doesn't overwrite SOAP
|
||||
headers). (duncan3dc)
|
||||
@@ -65,7 +157,8 @@ PHP NEWS
|
||||
|
||||
- Wddx:
|
||||
. Fixed bug #73631 (Invalid read when wddx decodes empty boolean element).
|
||||
(Stas)
|
||||
(Stas)
|
||||
|
||||
- XML:
|
||||
. Fixed bug #72135 (malformed XML causes fault) (edgarsandi)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ This is the github mirror of the official PHP repository located at
|
||||
http://git.php.net.
|
||||
|
||||
[](http://travis-ci.org/php/php-src)
|
||||
[](https://ci.appveyor.com/project/php/php-src)
|
||||
|
||||
Pull Requests
|
||||
=============
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2016 The PHP Group |
|
||||
| Copyright (c) 1997-2017 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2016 The PHP Group |
|
||||
| Copyright (c) 1997-2017 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2016 The PHP Group |
|
||||
| Copyright (c) 1997-2017 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2016 The PHP Group |
|
||||
| Copyright (c) 1997-2017 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -484,6 +484,7 @@ Other
|
||||
is defined in the interface.
|
||||
. session.lazy_write(default=On) INI setting enables only write session data when
|
||||
session data is updated.
|
||||
. session_regenerate_id() saves current $_SESSION before creating new session ID.
|
||||
|
||||
- Opcache
|
||||
. Removed opcache.load_comments configuration directive. Now doc comments
|
||||
|
||||
@@ -26,7 +26,6 @@ var_dump(count(get_defined_constants()));
|
||||
function test () {
|
||||
}
|
||||
|
||||
var_dump(get_defined_functions(true));
|
||||
var_dump(gettype(get_defined_functions()));
|
||||
var_dump(count(get_defined_functions()));
|
||||
|
||||
@@ -65,9 +64,6 @@ NULL
|
||||
string(5) "array"
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
|
||||
Warning: get_defined_functions() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Assign to $this leaks when $this not defined
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
try {
|
||||
$this->a = new stdClass;
|
||||
} catch (Error $e) { echo $e->getMessage(), "\n"; }
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Using $this when not in object context
|
||||
@@ -0,0 +1,73 @@
|
||||
--TEST--
|
||||
Bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created with list())
|
||||
--FILE--
|
||||
<?php
|
||||
function change(&$ref) {
|
||||
$ref = range(1, 10);
|
||||
return;
|
||||
}
|
||||
|
||||
$func = function (&$ref) {
|
||||
return change($ref);
|
||||
};
|
||||
|
||||
$array = [1];
|
||||
var_dump(list($val) = $array); // NG: Invalid opcode
|
||||
|
||||
change(list($val) = $array);
|
||||
var_dump($array);
|
||||
|
||||
$array = [1];
|
||||
|
||||
$func(list($val) = $array);
|
||||
var_dump($array);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
array(10) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
[3]=>
|
||||
int(4)
|
||||
[4]=>
|
||||
int(5)
|
||||
[5]=>
|
||||
int(6)
|
||||
[6]=>
|
||||
int(7)
|
||||
[7]=>
|
||||
int(8)
|
||||
[8]=>
|
||||
int(9)
|
||||
[9]=>
|
||||
int(10)
|
||||
}
|
||||
array(10) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
[3]=>
|
||||
int(4)
|
||||
[4]=>
|
||||
int(5)
|
||||
[5]=>
|
||||
int(6)
|
||||
[6]=>
|
||||
int(7)
|
||||
[7]=>
|
||||
int(8)
|
||||
[8]=>
|
||||
int(9)
|
||||
[9]=>
|
||||
int(10)
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Bug #73753 Non packed arrays and duplication
|
||||
--FILE--
|
||||
<?php
|
||||
function iterate($current, $a, $result = null) {
|
||||
if (!$current) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
return iterate(getNext($a), $a, $current);
|
||||
}
|
||||
|
||||
function getNext(&$a) {
|
||||
return next($a);
|
||||
}
|
||||
|
||||
function getCurrent($a) {
|
||||
return current($a);
|
||||
}
|
||||
|
||||
function traverse($a) {
|
||||
return iterate(getCurrent($a), $a);
|
||||
}
|
||||
|
||||
$arr = array(1 => 'foo', 'b' => 'bar', 'baz');
|
||||
var_dump(traverse($arr));
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(3) "baz"
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #73792 (invalid foreach loop hangs script)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = 'aaa';
|
||||
|
||||
foreach ($a['bbb'] as &$value) {
|
||||
echo 'loop';
|
||||
}
|
||||
|
||||
unset($value);
|
||||
echo 'done';
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Illegal string offset 'bbb' in %sbug73792.php on line 4
|
||||
|
||||
Fatal error: Uncaught Error: Cannot iterate on string offsets by reference in %sbug73792.php:4
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug73792.php on line 4
|
||||
@@ -0,0 +1,184 @@
|
||||
--TEST--
|
||||
Behavior of failing compound assignment
|
||||
--INI--
|
||||
opcache.optimization_level=0
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
try {
|
||||
$a = 1;
|
||||
$a %= 0;
|
||||
} catch (Error $e) { var_dump($a); }
|
||||
|
||||
try {
|
||||
$a = 1;
|
||||
$a >>= -1;
|
||||
} catch (Error $e) { var_dump($a); }
|
||||
|
||||
try {
|
||||
$a = 1;
|
||||
$a <<= -1;
|
||||
} catch (Error $e) { var_dump($a); }
|
||||
|
||||
set_error_handler(function($type, $msg) { throw new Exception($msg); });
|
||||
|
||||
try {
|
||||
$a = [];
|
||||
$a .= "foo";
|
||||
} catch (Throwable $e) { var_dump($a); }
|
||||
|
||||
try {
|
||||
$a = "foo";
|
||||
$a .= [];
|
||||
} catch (Throwable $e) { var_dump($a); }
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x += 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x += new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x -= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x -= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x *= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x *= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x /= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x /= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x %= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x %= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x **= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x **= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x ^= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x ^= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x &= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x &= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x |= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x |= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x <<= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x <<= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = new stdClass;
|
||||
try { $x >>= 1; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
|
||||
$x = 1;
|
||||
try { $x >>= new stdClass; }
|
||||
catch (Exception $e) {}
|
||||
var_dump($x);
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(1)
|
||||
int(1)
|
||||
int(1)
|
||||
array(0) {
|
||||
}
|
||||
string(3) "foo"
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
object(stdClass)#%d (0) {
|
||||
}
|
||||
int(1)
|
||||
+14
-28
@@ -2,51 +2,37 @@
|
||||
Concatenating many small strings should not slowdown allocations
|
||||
--SKIPIF--
|
||||
<?php if (PHP_DEBUG) { die ("skip debug version is slow"); } ?>
|
||||
--INI--
|
||||
memory_limit=256m
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* To note is that memory usage can vary depending on whether opcache is on. The actual
|
||||
measuring that matters is timing here. */
|
||||
|
||||
$time = microtime(TRUE);
|
||||
|
||||
/* This might vary on Linux/Windows, so the worst case and also count in slow machines. */
|
||||
$t0_max = 0.1;
|
||||
$t1_max = 0.4;
|
||||
|
||||
$datas = [];
|
||||
for ($i = 0; $i < 220000; $i++)
|
||||
{
|
||||
$datas[] = [
|
||||
'000.000.000.000',
|
||||
'000.255.255.255',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
];
|
||||
}
|
||||
|
||||
$t0 = microtime(TRUE) - $time;
|
||||
var_dump($t0 < $t0_max);
|
||||
$t_max = 1.0;
|
||||
|
||||
$datas = array_fill(0, 220000, [
|
||||
'000.000.000.000',
|
||||
'000.255.255.255',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
'保留地址',
|
||||
]);
|
||||
|
||||
$time = microtime(TRUE);
|
||||
$texts = '';
|
||||
foreach ($datas AS $data)
|
||||
{
|
||||
$texts .= implode("\t", $data) . "\r\n";
|
||||
}
|
||||
|
||||
$t1 = microtime(TRUE) - $time;
|
||||
var_dump($t1 < $t1_max);
|
||||
$t = microtime(TRUE) - $time;
|
||||
var_dump($t < $t_max);
|
||||
|
||||
?>
|
||||
+++DONE+++
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
+++DONE+++
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Calling generator through magic __call()
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public function __call($name, $args) {
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
yield $i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
foreach ($a->gen() as $n) {
|
||||
var_dump($n);
|
||||
}
|
||||
$a->gen();
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(1)
|
||||
int(2)
|
||||
int(3)
|
||||
int(4)
|
||||
@@ -3,7 +3,7 @@ Test get_defined_functions() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* Prototype : array get_defined_functions ( void )
|
||||
/* Prototype : array get_defined_functions ( $exclude_disabled = false )
|
||||
* Description: Gets an array of all defined functions.
|
||||
* Source code: Zend/zend_builtin_functions.c
|
||||
*/
|
||||
@@ -14,7 +14,8 @@ echo "*** Testing get_defined_functions() : error conditions ***\n";
|
||||
|
||||
echo "\n-- Testing get_defined_functions() function with more than expected no. of arguments --\n";
|
||||
$extra_arg = 10;
|
||||
var_dump( get_defined_functions($extra_arg) );
|
||||
$extra_arg2 = 20;
|
||||
var_dump( get_defined_functions($extra_arg, $extra_arg2) );
|
||||
|
||||
?>
|
||||
===Done===
|
||||
@@ -23,7 +24,7 @@ var_dump( get_defined_functions($extra_arg) );
|
||||
|
||||
-- Testing get_defined_functions() function with more than expected no. of arguments --
|
||||
|
||||
Warning: get_defined_functions() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
Warning: get_defined_functions() expects at most 1 parameter, 2 given in %s on line %d
|
||||
NULL
|
||||
|
||||
===Done===
|
||||
@@ -6,6 +6,8 @@ ANDing strings
|
||||
$s = "123";
|
||||
$s1 = "test";
|
||||
$s2 = "45345some";
|
||||
$s3 = str_repeat("f", 1);
|
||||
$s4 = str_repeat("f", 2);
|
||||
|
||||
$s &= 22;
|
||||
var_dump($s);
|
||||
@@ -16,10 +18,18 @@ var_dump($s1);
|
||||
$s2 &= 33;
|
||||
var_dump($s2);
|
||||
|
||||
$s3 &= " ";
|
||||
var_dump($s3);
|
||||
|
||||
$s4 &= " ";
|
||||
var_dump($s4);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(18)
|
||||
int(0)
|
||||
int(33)
|
||||
string(1) " "
|
||||
string(2) " "
|
||||
Done
|
||||
@@ -6,6 +6,8 @@ ORing strings
|
||||
$s = "123";
|
||||
$s1 = "test";
|
||||
$s2 = "45345some";
|
||||
$s3 = str_repeat("f", 1);
|
||||
$s4 = str_repeat("f", 2);
|
||||
|
||||
$s |= 22;
|
||||
var_dump($s);
|
||||
@@ -16,10 +18,18 @@ var_dump($s1);
|
||||
$s2 |= 33;
|
||||
var_dump($s2);
|
||||
|
||||
$s3 |= " ";
|
||||
var_dump($s3);
|
||||
|
||||
$s4 |= " ";
|
||||
var_dump($s4);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(127)
|
||||
int(11)
|
||||
int(45345)
|
||||
string(1) "f"
|
||||
string(2) "ff"
|
||||
Done
|
||||
@@ -6,6 +6,8 @@ XORing strings
|
||||
$s = "123";
|
||||
$s1 = "test";
|
||||
$s2 = "45345some";
|
||||
$s3 = str_repeat("f", 1);
|
||||
$s4 = str_repeat("f", 2);
|
||||
|
||||
$s ^= 22;
|
||||
var_dump($s);
|
||||
@@ -16,10 +18,18 @@ var_dump($s1);
|
||||
$s2 ^= 33;
|
||||
var_dump($s2);
|
||||
|
||||
$s3 ^= " ";
|
||||
var_dump($s3);
|
||||
|
||||
$s4 ^= " ";
|
||||
var_dump($s4);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(109)
|
||||
int(11)
|
||||
int(45312)
|
||||
string(1) "F"
|
||||
string(2) "FF"
|
||||
Done
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -156,7 +156,7 @@ ZEND_API zend_utility_values zend_uv;
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
static uint zend_version_info_length;
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2016 Zend Technologies\n"
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2017 Zend Technologies\n"
|
||||
#define PRINT_ZVAL_INDENT 4
|
||||
|
||||
static void print_hash(zend_write_func_t write_func, HashTable *ht, int indent, zend_bool is_object) /* {{{ */
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -2343,7 +2343,7 @@ ZEND_API int is_zend_mm(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !ZEND_DEBUG && (!defined(_WIN32) || defined(__clang__))
|
||||
#if !ZEND_DEBUG && defined(HAVE_BUILTIN_CONSTANT_P)
|
||||
#undef _emalloc
|
||||
|
||||
#if ZEND_MM_CUSTOM
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -1868,13 +1868,22 @@ static int copy_function_name(zval *zv, int num_args, va_list args, zend_hash_ke
|
||||
zend_function *func = Z_PTR_P(zv);
|
||||
zval *internal_ar = va_arg(args, zval *),
|
||||
*user_ar = va_arg(args, zval *);
|
||||
zend_bool *exclude_disabled = va_arg(args, zend_bool *);
|
||||
|
||||
if (hash_key->key == NULL || ZSTR_VAL(hash_key->key)[0] == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (func->type == ZEND_INTERNAL_FUNCTION) {
|
||||
add_next_index_str(internal_ar, zend_string_copy(hash_key->key));
|
||||
char *disable_functions = INI_STR("disable_functions");
|
||||
|
||||
if ((*exclude_disabled == 1) && (disable_functions != NULL)) {
|
||||
if (strstr(disable_functions, func->common.function_name->val) == NULL) {
|
||||
add_next_index_str(internal_ar, zend_string_copy(hash_key->key));
|
||||
}
|
||||
} else {
|
||||
add_next_index_str(internal_ar, zend_string_copy(hash_key->key));
|
||||
}
|
||||
} else if (func->type == ZEND_USER_FUNCTION) {
|
||||
add_next_index_str(user_ar, zend_string_copy(hash_key->key));
|
||||
}
|
||||
@@ -1888,8 +1897,9 @@ static int copy_function_name(zval *zv, int num_args, va_list args, zend_hash_ke
|
||||
ZEND_FUNCTION(get_defined_functions)
|
||||
{
|
||||
zval internal, user;
|
||||
zend_bool exclude_disabled = 0;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &exclude_disabled) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1897,7 +1907,7 @@ ZEND_FUNCTION(get_defined_functions)
|
||||
array_init(&user);
|
||||
array_init(return_value);
|
||||
|
||||
zend_hash_apply_with_arguments(EG(function_table), copy_function_name, 2, &internal, &user);
|
||||
zend_hash_apply_with_arguments(EG(function_table), copy_function_name, 3, &internal, &user, &exclude_disabled);
|
||||
|
||||
zend_hash_str_add_new(Z_ARRVAL_P(return_value), "internal", sizeof("internal")-1, &internal);
|
||||
zend_hash_str_add_new(Z_ARRVAL_P(return_value), "user", sizeof("user")-1, &user);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+13
-6
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -1002,10 +1002,8 @@ ZEND_API zend_class_entry *do_bind_class(const zend_op_array* op_array, const ze
|
||||
op1 = RT_CONSTANT(op_array, opline->op1);
|
||||
op2 = RT_CONSTANT(op_array, opline->op2);
|
||||
}
|
||||
if ((ce = zend_hash_find_ptr(class_table, Z_STR_P(op1))) == NULL) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Internal Zend error - Missing class information for %s", Z_STRVAL_P(op1));
|
||||
return NULL;
|
||||
}
|
||||
ce = zend_hash_find_ptr(class_table, Z_STR_P(op1));
|
||||
ZEND_ASSERT(ce);
|
||||
ce->refcount++;
|
||||
if (zend_hash_add_ptr(class_table, Z_STR_P(op2), ce) == NULL) {
|
||||
ce->refcount--;
|
||||
@@ -2783,12 +2781,21 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
|
||||
}
|
||||
} else {
|
||||
zend_compile_expr(&arg_node, arg);
|
||||
ZEND_ASSERT(arg_node.op_type != IS_CV);
|
||||
if (arg_node.op_type == IS_VAR) {
|
||||
opcode = ZEND_SEND_VAR_NO_REF;
|
||||
if (fbc && ARG_MUST_BE_SENT_BY_REF(fbc, arg_num)) {
|
||||
flags |= ZEND_ARG_SEND_BY_REF;
|
||||
}
|
||||
} else if (arg_node.op_type == IS_CV) {
|
||||
if (fbc) {
|
||||
if (ARG_SHOULD_BE_SENT_BY_REF(fbc, arg_num)) {
|
||||
opcode = ZEND_SEND_REF;
|
||||
} else {
|
||||
opcode = ZEND_SEND_VAR;
|
||||
}
|
||||
} else {
|
||||
opcode = ZEND_SEND_VAR_EX;
|
||||
}
|
||||
} else {
|
||||
if (fbc) {
|
||||
opcode = ZEND_SEND_VAL;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -186,7 +186,9 @@ ZEND_API void zend_clear_exception(void) /* {{{ */
|
||||
}
|
||||
OBJ_RELEASE(EG(exception));
|
||||
EG(exception) = NULL;
|
||||
EG(current_execute_data)->opline = EG(opline_before_exception);
|
||||
if (EG(current_execute_data)) {
|
||||
EG(current_execute_data)->opline = EG(opline_before_exception);
|
||||
}
|
||||
#if ZEND_DEBUG
|
||||
EG(opline_before_exception) = NULL;
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -519,6 +519,7 @@ ZEND_API zend_generator *zend_generator_update_current(zend_generator *generator
|
||||
generator->execute_fake.prev_execute_data = original_execute_data;
|
||||
}
|
||||
|
||||
root->execute_data->opline--; /* ZEND_YIELD(_FROM) already advance, so decrement opline to throw from correct place */
|
||||
zend_throw_exception(zend_ce_ClosedGeneratorException, "Generator yielded from aborted, no return value available", 0);
|
||||
|
||||
EG(current_execute_data) = original_execute_data;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+6
-5
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -175,7 +175,6 @@ ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_
|
||||
GC_REFCOUNT(ht) = 1;
|
||||
GC_TYPE_INFO(ht) = IS_ARRAY;
|
||||
ht->u.flags = (persistent ? HASH_FLAG_PERSISTENT : 0) | HASH_FLAG_APPLY_PROTECTION | HASH_FLAG_STATIC_KEYS;
|
||||
ht->nTableSize = zend_hash_check_size(nSize);
|
||||
ht->nTableMask = HT_MIN_MASK;
|
||||
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
|
||||
ht->nNumUsed = 0;
|
||||
@@ -183,6 +182,7 @@ ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_
|
||||
ht->nInternalPointer = HT_INVALID_IDX;
|
||||
ht->nNextFreeElement = 0;
|
||||
ht->pDestructor = pDestructor;
|
||||
ht->nTableSize = zend_hash_check_size(nSize);
|
||||
}
|
||||
|
||||
static void ZEND_FASTCALL zend_hash_packed_grow(HashTable *ht)
|
||||
@@ -1757,7 +1757,7 @@ static zend_always_inline void zend_array_dup_packed_elements(HashTable *source,
|
||||
|
||||
static zend_always_inline uint32_t zend_array_dup_elements(HashTable *source, HashTable *target, int static_keys, int with_holes)
|
||||
{
|
||||
uint32_t idx = 0;
|
||||
uint32_t idx = 0;
|
||||
Bucket *p = source->arData;
|
||||
Bucket *q = target->arData;
|
||||
Bucket *end = p + source->nNumUsed;
|
||||
@@ -1785,7 +1785,7 @@ static zend_always_inline uint32_t zend_array_dup_elements(HashTable *source, Ha
|
||||
|
||||
ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
{
|
||||
uint32_t idx;
|
||||
uint32_t idx;
|
||||
HashTable *target;
|
||||
|
||||
IS_CONSISTENT(source);
|
||||
@@ -1849,7 +1849,8 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
target->u.flags = (source->u.flags & ~(HASH_FLAG_PERSISTENT|ZEND_HASH_APPLY_COUNT_MASK)) | HASH_FLAG_APPLY_PROTECTION;
|
||||
target->nTableMask = source->nTableMask;
|
||||
target->nNextFreeElement = source->nNextFreeElement;
|
||||
target->nInternalPointer = HT_INVALID_IDX;
|
||||
target->nInternalPointer = source->nInternalPointer;
|
||||
|
||||
HT_SET_DATA_ADDR(target, emalloc(HT_SIZE(target)));
|
||||
HT_HASH_RESET(target);
|
||||
|
||||
|
||||
+11
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -301,6 +301,16 @@ static zend_always_inline zval *zend_hash_str_find_ind(const HashTable *ht, cons
|
||||
}
|
||||
|
||||
|
||||
static zend_always_inline int zend_hash_str_exists_ind(const HashTable *ht, const char *str, size_t len)
|
||||
{
|
||||
zval *zv;
|
||||
|
||||
zv = zend_hash_str_find(ht, str, len);
|
||||
return zv && (Z_TYPE_P(zv) != IS_INDIRECT ||
|
||||
Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF);
|
||||
}
|
||||
|
||||
|
||||
static zend_always_inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval *pData)
|
||||
{
|
||||
zend_ulong idx;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+2320
-3141
File diff suppressed because it is too large.
Load diff
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -408,9 +408,9 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
|
||||
<INITIAL>"[" { /* Section start */
|
||||
/* Enter section data lookup state */
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW) {
|
||||
yy_push_state(ST_SECTION_RAW);
|
||||
BEGIN(ST_SECTION_RAW);
|
||||
} else {
|
||||
yy_push_state(ST_SECTION_VALUE);
|
||||
BEGIN(ST_SECTION_VALUE);
|
||||
}
|
||||
return TC_SECTION;
|
||||
}
|
||||
@@ -438,7 +438,7 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
|
||||
EAT_TRAILING_WHITESPACE_EX('[');
|
||||
|
||||
/* Enter offset lookup state */
|
||||
yy_push_state(ST_OFFSET);
|
||||
BEGIN(ST_OFFSET);
|
||||
|
||||
RETURN_TOKEN(TC_OFFSET, yytext, yyleng);
|
||||
}
|
||||
@@ -492,9 +492,9 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
|
||||
|
||||
<INITIAL>{TABS_AND_SPACES}*[=]{TABS_AND_SPACES}* { /* Start option value */
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW) {
|
||||
yy_push_state(ST_RAW);
|
||||
BEGIN(ST_RAW);
|
||||
} else {
|
||||
yy_push_state(ST_VALUE);
|
||||
BEGIN(ST_VALUE);
|
||||
}
|
||||
return '=';
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.14.3 */
|
||||
/* Generated by re2c 0.16 */
|
||||
#line 3 "Zend/zend_ini_scanner_defs.h"
|
||||
|
||||
enum YYCONDTYPE {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+123
-55
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -188,41 +188,45 @@ try_again:
|
||||
|
||||
/* {{{ zendi_convert_scalar_to_number */
|
||||
#define zendi_convert_scalar_to_number(op, holder, result) \
|
||||
if (op==result) { \
|
||||
if (Z_TYPE_P(op) != IS_LONG) { \
|
||||
convert_scalar_to_number(op); \
|
||||
} \
|
||||
} else { \
|
||||
switch (Z_TYPE_P(op)) { \
|
||||
case IS_STRING: \
|
||||
{ \
|
||||
if (Z_TYPE_P(op) != IS_LONG) { \
|
||||
if (op==result && Z_TYPE_P(op) != IS_OBJECT) { \
|
||||
convert_scalar_to_number(op); \
|
||||
} else { \
|
||||
switch (Z_TYPE_P(op)) { \
|
||||
case IS_STRING: \
|
||||
if ((Z_TYPE_INFO(holder)=is_numeric_string(Z_STRVAL_P(op), Z_STRLEN_P(op), &Z_LVAL(holder), &Z_DVAL(holder), 1)) == 0) { \
|
||||
ZVAL_LONG(&(holder), 0); \
|
||||
} \
|
||||
(op) = &(holder); \
|
||||
break; \
|
||||
} \
|
||||
case IS_NULL: \
|
||||
case IS_FALSE: \
|
||||
ZVAL_LONG(&(holder), 0); \
|
||||
(op) = &(holder); \
|
||||
break; \
|
||||
case IS_TRUE: \
|
||||
ZVAL_LONG(&(holder), 1); \
|
||||
(op) = &(holder); \
|
||||
break; \
|
||||
case IS_RESOURCE: \
|
||||
ZVAL_LONG(&(holder), Z_RES_HANDLE_P(op)); \
|
||||
(op) = &(holder); \
|
||||
break; \
|
||||
case IS_OBJECT: \
|
||||
ZVAL_COPY(&(holder), op); \
|
||||
convert_to_long_base(&(holder), 10); \
|
||||
if (Z_TYPE(holder) == IS_LONG) { \
|
||||
(op) = &(holder); \
|
||||
} \
|
||||
break; \
|
||||
} \
|
||||
ZVAL_LONG(&(holder), 0); \
|
||||
} \
|
||||
(op) = &(holder); \
|
||||
break; \
|
||||
case IS_NULL: \
|
||||
case IS_FALSE: \
|
||||
ZVAL_LONG(&(holder), 0); \
|
||||
(op) = &(holder); \
|
||||
break; \
|
||||
case IS_TRUE: \
|
||||
ZVAL_LONG(&(holder), 1); \
|
||||
(op) = &(holder); \
|
||||
break; \
|
||||
case IS_RESOURCE: \
|
||||
ZVAL_LONG(&(holder), Z_RES_HANDLE_P(op)); \
|
||||
(op) = &(holder); \
|
||||
break; \
|
||||
case IS_OBJECT: \
|
||||
ZVAL_COPY(&(holder), op); \
|
||||
convert_to_long_base(&(holder), 10); \
|
||||
if (UNEXPECTED(EG(exception))) { \
|
||||
return FAILURE; \
|
||||
} \
|
||||
if (Z_TYPE(holder) == IS_LONG) { \
|
||||
if (op == result) { \
|
||||
zval_ptr_dtor(op); \
|
||||
} \
|
||||
(op) = &(holder); \
|
||||
} \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -259,6 +263,9 @@ try_again:
|
||||
} \
|
||||
ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(op, op_func); \
|
||||
op1_lval = _zval_get_long_func(op1); \
|
||||
if (UNEXPECTED(EG(exception))) { \
|
||||
return FAILURE; \
|
||||
} \
|
||||
} else { \
|
||||
op1_lval = Z_LVAL_P(op1); \
|
||||
} \
|
||||
@@ -274,6 +281,9 @@ try_again:
|
||||
} \
|
||||
ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(op); \
|
||||
op2_lval = _zval_get_long_func(op2); \
|
||||
if (UNEXPECTED(EG(exception))) { \
|
||||
return FAILURE; \
|
||||
} \
|
||||
} else { \
|
||||
op2_lval = Z_LVAL_P(op2); \
|
||||
} \
|
||||
@@ -1187,10 +1197,6 @@ ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {
|
||||
|
||||
convert_op1_op2_long(op1, op1_lval, op2, op2_lval, ZEND_MOD, mod_function);
|
||||
|
||||
if (op1 == result) {
|
||||
zval_dtor(result);
|
||||
}
|
||||
|
||||
if (op2_lval == 0) {
|
||||
/* modulus by zero */
|
||||
if (EG(current_execute_data) && !CG(in_compilation)) {
|
||||
@@ -1198,10 +1204,16 @@ ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {
|
||||
} else {
|
||||
zend_error_noreturn(E_ERROR, "Modulo by zero");
|
||||
}
|
||||
ZVAL_UNDEF(result);
|
||||
if (op1 != result) {
|
||||
ZVAL_UNDEF(result);
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (op1 == result) {
|
||||
zval_dtor(result);
|
||||
}
|
||||
|
||||
if (op2_lval == -1) {
|
||||
/* Prevent overflow error/crash if op1==LONG_MIN */
|
||||
ZVAL_LONG(result, 0);
|
||||
@@ -1349,6 +1361,9 @@ ZEND_API int ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op
|
||||
if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) {
|
||||
if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) {
|
||||
zend_uchar or = (zend_uchar) (*Z_STRVAL_P(op1) | *Z_STRVAL_P(op2));
|
||||
if (result==op1) {
|
||||
zend_string_release(Z_STR_P(result));
|
||||
}
|
||||
if (CG(one_char_string)[or]) {
|
||||
ZVAL_INTERNED_STR(result, CG(one_char_string)[or]);
|
||||
} else {
|
||||
@@ -1378,12 +1393,18 @@ ZEND_API int ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op
|
||||
if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) {
|
||||
ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_OR, bitwise_or_function);
|
||||
op1_lval = _zval_get_long_func(op1);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
return FAILURE;
|
||||
}
|
||||
} else {
|
||||
op1_lval = Z_LVAL_P(op1);
|
||||
}
|
||||
if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) {
|
||||
ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_OR);
|
||||
op2_lval = _zval_get_long_func(op2);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
return FAILURE;
|
||||
}
|
||||
} else {
|
||||
op2_lval = Z_LVAL_P(op2);
|
||||
}
|
||||
@@ -1416,6 +1437,9 @@ ZEND_API int ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *o
|
||||
if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) {
|
||||
if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) {
|
||||
zend_uchar and = (zend_uchar) (*Z_STRVAL_P(op1) & *Z_STRVAL_P(op2));
|
||||
if (result==op1) {
|
||||
zend_string_release(Z_STR_P(result));
|
||||
}
|
||||
if (CG(one_char_string)[and]) {
|
||||
ZVAL_INTERNED_STR(result, CG(one_char_string)[and]);
|
||||
} else {
|
||||
@@ -1445,12 +1469,18 @@ ZEND_API int ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *o
|
||||
if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) {
|
||||
ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_AND, bitwise_and_function);
|
||||
op1_lval = _zval_get_long_func(op1);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
return FAILURE;
|
||||
}
|
||||
} else {
|
||||
op1_lval = Z_LVAL_P(op1);
|
||||
}
|
||||
if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) {
|
||||
ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_AND);
|
||||
op2_lval = _zval_get_long_func(op2);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
return FAILURE;
|
||||
}
|
||||
} else {
|
||||
op2_lval = Z_LVAL_P(op2);
|
||||
}
|
||||
@@ -1483,6 +1513,9 @@ ZEND_API int ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *o
|
||||
if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) {
|
||||
if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) {
|
||||
zend_uchar xor = (zend_uchar) (*Z_STRVAL_P(op1) ^ *Z_STRVAL_P(op2));
|
||||
if (result==op1) {
|
||||
zend_string_release(Z_STR_P(result));
|
||||
}
|
||||
if (CG(one_char_string)[xor]) {
|
||||
ZVAL_INTERNED_STR(result, CG(one_char_string)[xor]);
|
||||
} else {
|
||||
@@ -1512,12 +1545,18 @@ ZEND_API int ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *o
|
||||
if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) {
|
||||
ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_XOR, bitwise_xor_function);
|
||||
op1_lval = _zval_get_long_func(op1);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
return FAILURE;
|
||||
}
|
||||
} else {
|
||||
op1_lval = Z_LVAL_P(op1);
|
||||
}
|
||||
if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) {
|
||||
ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_XOR);
|
||||
op2_lval = _zval_get_long_func(op2);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
return FAILURE;
|
||||
}
|
||||
} else {
|
||||
op2_lval = Z_LVAL_P(op2);
|
||||
}
|
||||
@@ -1536,13 +1575,12 @@ ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op
|
||||
|
||||
convert_op1_op2_long(op1, op1_lval, op2, op2_lval, ZEND_SL, shift_left_function);
|
||||
|
||||
if (op1 == result) {
|
||||
zval_dtor(result);
|
||||
}
|
||||
|
||||
/* prevent wrapping quirkiness on some processors where << 64 + x == << x */
|
||||
if (UNEXPECTED((zend_ulong)op2_lval >= SIZEOF_ZEND_LONG * 8)) {
|
||||
if (EXPECTED(op2_lval > 0)) {
|
||||
if (op1 == result) {
|
||||
zval_dtor(result);
|
||||
}
|
||||
ZVAL_LONG(result, 0);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
@@ -1551,11 +1589,17 @@ ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op
|
||||
} else {
|
||||
zend_error_noreturn(E_ERROR, "Bit shift by negative number");
|
||||
}
|
||||
ZVAL_UNDEF(result);
|
||||
if (op1 != result) {
|
||||
ZVAL_UNDEF(result);
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
if (op1 == result) {
|
||||
zval_dtor(result);
|
||||
}
|
||||
|
||||
ZVAL_LONG(result, op1_lval << op2_lval);
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -1567,13 +1611,12 @@ ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *o
|
||||
|
||||
convert_op1_op2_long(op1, op1_lval, op2, op2_lval, ZEND_SR, shift_right_function);
|
||||
|
||||
if (op1 == result) {
|
||||
zval_dtor(result);
|
||||
}
|
||||
|
||||
/* prevent wrapping quirkiness on some processors where >> 64 + x == >> x */
|
||||
if (UNEXPECTED((zend_ulong)op2_lval >= SIZEOF_ZEND_LONG * 8)) {
|
||||
if (EXPECTED(op2_lval > 0)) {
|
||||
if (op1 == result) {
|
||||
zval_dtor(result);
|
||||
}
|
||||
ZVAL_LONG(result, (op1_lval < 0) ? -1 : 0);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
@@ -1582,11 +1625,17 @@ ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *o
|
||||
} else {
|
||||
zend_error_noreturn(E_ERROR, "Bit shift by negative number");
|
||||
}
|
||||
ZVAL_UNDEF(result);
|
||||
if (op1 != result) {
|
||||
ZVAL_UNDEF(result);
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
if (op1 == result) {
|
||||
zval_dtor(result);
|
||||
}
|
||||
|
||||
ZVAL_LONG(result, op1_lval >> op2_lval);
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -1594,6 +1643,7 @@ ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *o
|
||||
|
||||
ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */
|
||||
{
|
||||
zval *orig_op1 = op1;
|
||||
zval op1_copy, op2_copy;
|
||||
int use_copy1 = 0, use_copy2 = 0;
|
||||
|
||||
@@ -1606,11 +1656,11 @@ ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /
|
||||
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_CONCAT, concat_function);
|
||||
use_copy1 = zend_make_printable_zval(op1, &op1_copy);
|
||||
if (use_copy1) {
|
||||
/* We have created a converted copy of op1. Therefore, op1 won't become the result so
|
||||
* we have to free it.
|
||||
*/
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
zval_dtor(&op1_copy);
|
||||
return FAILURE;
|
||||
}
|
||||
if (result == op1) {
|
||||
zval_dtor(op1);
|
||||
if (UNEXPECTED(op1 == op2)) {
|
||||
op2 = &op1_copy;
|
||||
}
|
||||
@@ -1628,6 +1678,13 @@ ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /
|
||||
ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_CONCAT);
|
||||
use_copy2 = zend_make_printable_zval(op2, &op2_copy);
|
||||
if (use_copy2) {
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (UNEXPECTED(use_copy1)) {
|
||||
zval_dtor(op1);
|
||||
}
|
||||
zval_dtor(&op2_copy);
|
||||
return FAILURE;
|
||||
}
|
||||
op2 = &op2_copy;
|
||||
}
|
||||
}
|
||||
@@ -1641,7 +1698,15 @@ ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /
|
||||
|
||||
if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) {
|
||||
zend_throw_error(NULL, "String size overflow");
|
||||
ZVAL_FALSE(result);
|
||||
if (UNEXPECTED(use_copy1)) {
|
||||
zval_dtor(op1);
|
||||
}
|
||||
if (UNEXPECTED(use_copy2)) {
|
||||
zval_dtor(op2);
|
||||
}
|
||||
if (orig_op1 != result) {
|
||||
ZVAL_UNDEF(result);
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -1651,6 +1716,9 @@ ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /
|
||||
} else {
|
||||
result_str = zend_string_alloc(result_len, 0);
|
||||
memcpy(ZSTR_VAL(result_str), Z_STRVAL_P(op1), op1_len);
|
||||
if (result == orig_op1) {
|
||||
zval_dtor(orig_op1);
|
||||
}
|
||||
}
|
||||
|
||||
/* This has to happen first to account for the cases where result == op1 == op2 and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2017 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
Loaded 100 of 1010 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user