mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-18 22:46:38 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e1b870157 | ||
|
|
6a48256752 | ||
|
|
bbde901c6d | ||
|
|
569dae22dc | ||
|
|
a5f38da057 | ||
|
|
315bf08de1 | ||
|
|
0fca0d9f42 | ||
|
|
7ffb976104 | ||
|
|
e231830f16 | ||
|
|
0007a695c8 | ||
|
|
877823e209 | ||
|
|
24167095a5 | ||
|
|
2a7d8c0a06 | ||
|
|
e7051cb47a | ||
|
|
20c38facfd | ||
|
|
0d86a98c31 | ||
|
|
309ead112f | ||
|
|
2f1ce4f209 | ||
|
|
5bde5a0a2e | ||
|
|
b5ef8ed168 | ||
|
|
ca02d9c2d6 | ||
|
|
33b1fbbb5c | ||
|
|
07c7df68bd | ||
|
|
6ba7acee5c | ||
|
|
7421acfc90 | ||
|
|
b783d0b338 | ||
|
|
dd3d10cef1 | ||
|
|
47af41b785 | ||
|
|
e92abf850e | ||
|
|
87a671bba0 | ||
|
|
fc53d7408b | ||
|
|
a1c675e3f2 | ||
|
|
686a17893a | ||
|
|
f4d7bbf4ac | ||
|
|
828364e59c | ||
|
|
df78eacc2f | ||
|
|
89ccd8ad56 | ||
|
|
a9048d101f | ||
|
|
f379142d66 | ||
|
|
54c210d2ea | ||
|
|
b2d5666d94 | ||
|
|
3c8f287d58 | ||
|
|
508d1dae25 | ||
|
|
a6801092ab | ||
|
|
f7e6ff99d7 | ||
|
|
2749bf4576 | ||
|
|
71dbad172f | ||
|
|
fa0dd6006d | ||
|
|
5673ede6e9 | ||
|
|
adf0be7680 | ||
|
|
f0e2fe8e75 | ||
|
|
f0b02f2351 | ||
|
|
52e0c4081f | ||
|
|
d7fc3be99e | ||
|
|
ee1dd4949a | ||
|
|
f9c595f3c0 | ||
|
|
bcd64a9bdd | ||
|
|
7554478a4c | ||
|
|
dc23f1f38f | ||
|
|
069522d494 | ||
|
|
3b55386e9b | ||
|
|
ff10dceff8 | ||
|
|
e585696a0b | ||
|
|
8052df8110 | ||
|
|
3b2d98a625 | ||
|
|
00eaaca18a | ||
|
|
dbba4418d8 | ||
|
|
6297a117d7 | ||
|
|
1c1b8b6998 | ||
|
|
9f2240963f | ||
|
|
93db2dac48 | ||
|
|
925aea7e1b | ||
|
|
348dd1a018 | ||
|
|
d1401f6059 | ||
|
|
34ff7bbeb1 | ||
|
|
4c2424eb24 | ||
|
|
bfb9307b2d | ||
|
|
d7f8d9e3a9 | ||
|
|
31ae802736 | ||
|
|
132d919c85 | ||
|
|
8c37a086c7 | ||
|
|
4ab7d6a5e1 | ||
|
|
33cc42d8a5 | ||
|
|
b05eb52c35 | ||
|
|
c126725a7f | ||
|
|
4308c868f9 | ||
|
|
12eff055da | ||
|
|
ad85cce1bc | ||
|
|
262f09d678 | ||
|
|
285cd3417f | ||
|
|
635ba1f2c3 | ||
|
|
13ad4d3e97 | ||
|
|
6a2621e3a5 | ||
|
|
39f0950746 | ||
|
|
50be2c89be | ||
|
|
c3c6ab08fe | ||
|
|
1f513805dc | ||
|
|
2b4625d687 | ||
|
|
bec0aec116 | ||
|
|
c527549e89 | ||
|
|
22a5ccab72 | ||
|
|
aa8d3a8cc6 | ||
|
|
af3f3be0c1 | ||
|
|
14e4d393cf | ||
|
|
63c77ee4b1 | ||
|
|
224aaf94af | ||
|
|
a15e9ccba8 | ||
|
|
4e7cb057a0 | ||
|
|
d8e2b8424f | ||
|
|
8e7c469f82 | ||
|
|
b54739e68d | ||
|
|
391b73b484 | ||
|
|
3bbcd84e2f | ||
|
|
f53a5dcca3 | ||
|
|
66d10fe085 | ||
|
|
3bbbd3ebcd | ||
|
|
e509144714 | ||
|
|
ba7736729e | ||
|
|
ce568f98bf | ||
|
|
f301a0b23c | ||
|
|
3217c033a5 | ||
|
|
c895dc5b5b | ||
|
|
7954e5dc2a | ||
|
|
58dd956b63 | ||
|
|
1f6612541f | ||
|
|
763f86b5d4 | ||
|
|
6d649b018c | ||
|
|
333765edce | ||
|
|
fffbca55e8 | ||
|
|
b188cafab3 | ||
|
|
39e571c8d8 | ||
|
|
57a2a8d4fa | ||
|
|
23fa54b908 | ||
|
|
8bfa5193d5 | ||
|
|
35e87c04fe | ||
|
|
ae50a0c0be | ||
|
|
c7256095c5 | ||
|
|
a98f6dad00 | ||
|
|
07133ae649 | ||
|
|
caae1191da | ||
|
|
0e808b2332 | ||
|
|
1fb763ccab | ||
|
|
e72848c171 | ||
|
|
42a145273c | ||
|
|
16a2b47394 | ||
|
|
83cb751047 | ||
|
|
da0eeacf1d | ||
|
|
bd2229e709 | ||
|
|
a6734f70e1 | ||
|
|
a95f36fa7b | ||
|
|
2d0215b063 | ||
|
|
96c205b5f6 | ||
|
|
033d608771 | ||
|
|
42e0fff928 | ||
|
|
b095a22a3b | ||
|
|
a9a7926df5 | ||
|
|
6802a9f28a | ||
|
|
ef4dc15831 | ||
|
|
86f48881a4 | ||
|
|
810452f68e | ||
|
|
1e1c5c427e | ||
|
|
2871c70efa | ||
|
|
e2565eb614 | ||
|
|
158288b3c6 | ||
|
|
c0928be7f8 | ||
|
|
d91b26d344 | ||
|
|
13750cb0a1 | ||
|
|
74dcbe1299 | ||
|
|
ce2b2f7e0a | ||
|
|
69112d7e97 | ||
|
|
1dc395c8c4 | ||
|
|
8d630f7d15 | ||
|
|
9a07245b72 | ||
|
|
695e8b79af | ||
|
|
654c8aedd1 | ||
|
|
d4da32d312 | ||
|
|
af960fcba4 | ||
|
|
736b91c650 | ||
|
|
0ea63cb2a8 | ||
|
|
cf1c50957b | ||
|
|
e4bdf51f0a | ||
|
|
82865dda71 | ||
|
|
84b8db597a | ||
|
|
2eaa755660 | ||
|
|
b0285db4b7 | ||
|
|
ef4449a8e8 | ||
|
|
bc4baf608b | ||
|
|
a09e65d2b8 | ||
|
|
36b4311edd | ||
|
|
919562d53b | ||
|
|
bce7ed1859 | ||
|
|
53fb2f1e5c | ||
|
|
302a35bb15 | ||
|
|
97a9470d97 | ||
|
|
6a7001ed72 | ||
|
|
3537e95dae | ||
|
|
d9bac84220 | ||
|
|
2c6a4445f7 | ||
|
|
a7b1ea3c84 | ||
|
|
6bcf4b4f40 | ||
|
|
59a7ef914f | ||
|
|
2eb1f38d24 | ||
|
|
ed35de784f | ||
|
|
c51e73c803 | ||
|
|
49493a2dcf | ||
|
|
87958927b0 | ||
|
|
05defb4f56 | ||
|
|
5362f0ad7f | ||
|
|
da028e0757 | ||
|
|
90d2f509e2 | ||
|
|
3f07a256f7 | ||
|
|
2baeb167a0 | ||
|
|
dcf3c9761c | ||
|
|
1785d2b805 | ||
|
|
c5f9d0b808 | ||
|
|
2c289f48e1 | ||
|
|
2453a48ab5 | ||
|
|
60f5c9f87f | ||
|
|
decb934e3a | ||
|
|
c56efb848b | ||
|
|
6700be67f5 | ||
|
|
2a7eeff33e | ||
|
|
8182f0ff2a | ||
|
|
0bdc2923b1 | ||
|
|
048fb4b00f | ||
|
|
d73d9fecf6 | ||
|
|
7f31a88bb8 | ||
|
|
599a0cfdeb | ||
|
|
e9d3ff0ec7 | ||
|
|
1c0d01522c | ||
|
|
bdc8f7d871 | ||
|
|
891ac59305 | ||
|
|
ca0b82fe93 | ||
|
|
e9d1dff514 | ||
|
|
7e399566a7 | ||
|
|
a7daf97198 | ||
|
|
3295264336 | ||
|
|
379b43bb3b | ||
|
|
4f528e5c95 | ||
|
|
8d1d5ffa22 | ||
|
|
841594ac18 | ||
|
|
a82f76634a | ||
|
|
3f09d301b5 | ||
|
|
9306c1d254 | ||
|
|
aadb3dd503 | ||
|
|
c2fa01b939 | ||
|
|
64071fc531 | ||
|
|
85809b969f | ||
|
|
46db3a7320 | ||
|
|
0b8c8bfc81 | ||
|
|
0ece97e5a4 | ||
|
|
204faa5c36 | ||
|
|
95454c448b | ||
|
|
dbda61b19b | ||
|
|
50c4be0309 | ||
|
|
0d822f6df9 | ||
|
|
5c11f4c489 | ||
|
|
825b7f895a | ||
|
|
8692a99551 | ||
|
|
620ccc9b1a | ||
|
|
9cc4cdbe57 | ||
|
|
e21cb2daea | ||
|
|
72207b5436 | ||
|
|
b2ecac9250 | ||
|
|
ea12ff149c | ||
|
|
f3bf95eb81 | ||
|
|
a57a08e791 | ||
|
|
3e3d0290ff | ||
|
|
4df84a648e | ||
|
|
897bf916bc | ||
|
|
332b778d68 | ||
|
|
ff7ed9021c | ||
|
|
4037ba5847 | ||
|
|
a3e37e0818 | ||
|
|
84530360a0 | ||
|
|
d63ae2c382 | ||
|
|
3524849f77 | ||
|
|
db1504de23 | ||
|
|
be19dbcb84 | ||
|
|
4bb422343f | ||
|
|
2e157c5275 |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2015 The PHP Group. All rights reserved.
|
||||
Copyright (c) 1999 - 2016 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,5 +1,88 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
04 Feb 2016 PHP 7.0.3
|
||||
|
||||
- Core:
|
||||
. Added support for new HTTP 451 code. (Julien)
|
||||
. Fixed bug #71039 (exec functions ignore length but look for NULL termination).
|
||||
(Anatol)
|
||||
. Fixed bug #71089 (No check to duplicate zend_extension). (Remi)
|
||||
. Fixed bug #71201 (round() segfault on 64-bit builds). (Anatol)
|
||||
. Fixed bug #71221 (Null pointer deref (segfault) in get_defined_vars via
|
||||
ob_start). (hugh at allthethings dot co dot nz)
|
||||
. Fixed bug #71248 (Wrong interface is enforced). (Dmitry)
|
||||
. Fixed bug #71273 (A wrong ext directory setup in php.ini leads to crash).
|
||||
(Anatol)
|
||||
. Fixed Bug #71275 (Bad method called on cloning an object having a trait).
|
||||
(Bob)
|
||||
. Fixed bug #71297 (Memory leak with consecutive yield from). (Bob)
|
||||
. Fixed bug #71300 (Segfault in zend_fetch_string_offset). (Laruence)
|
||||
. Fixed bug #71314 (var_export(INF) prints INF.0). (Andrea)
|
||||
. Fixed bug #71323 (Output of stream_get_meta_data can be falsified by its
|
||||
input). (Leo Gaspard)
|
||||
. Fixed bug #71336 (Wrong is_ref on properties as exposed via
|
||||
get_object_vars()). (Laruence)
|
||||
. Fixed bug #71459 (Integer overflow in iptcembed()). (Stas)
|
||||
|
||||
- Apache2handler:
|
||||
. Fix >2G Content-Length headers in apache2handler. (Adam Harvey)
|
||||
|
||||
- CURL:
|
||||
. Fixed bug #71227 (Can't compile php_curl statically). (Anatol)
|
||||
. Fixed bug #71225 (curl_setopt() fails to set CURLOPT_POSTFIELDS with
|
||||
reference to CURLFile). (Laruence)
|
||||
|
||||
- Interbase:
|
||||
. Fixed Bug #71305 (Crash when optional resource is omitted).
|
||||
(Laruence, Anatol)
|
||||
|
||||
- LDAP:
|
||||
. Fixed bug #71249 (ldap_mod_replace/ldap_mod_add store value as string
|
||||
"Array"). (Laruence)
|
||||
|
||||
- mbstring:
|
||||
. Fixed bug #71397 (mb_send_mail segmentation fault). (Andrea, Yasuo)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #71475 (openssl_seal() uninitialized memory usage). (Stas)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #71354 (Heap corruption in tar/zip/phar parser). (Stas)
|
||||
. Fixed bug #71391 (NULL Pointer Dereference in phar_tar_setupmetadata()).
|
||||
(Stas)
|
||||
. Fixed bug #71488 (Stack overflow when decompressing tar archives). (Stas)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #70979 (crash with bad soap request). (Anatol)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #71204 (segfault if clean spl_autoload_funcs while autoloading).
|
||||
(Laruence)
|
||||
. Fixed bug #71202 (Autoload function registered by another not activated
|
||||
immediately). (Laruence)
|
||||
. Fixed bug #71311 (Use-after-free vulnerability in SPL(ArrayObject,
|
||||
unserialize)). (Sean Heelan)
|
||||
. Fixed bug #71313 (Use-after-free vulnerability in SPL(SplObjectStorage,
|
||||
unserialize)). (Sean Heelan)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #71287 (Error message contains hexadecimal instead of decimal
|
||||
number). (Laruence)
|
||||
. Fixed bug #71264 (file_put_contents() returns unexpected value when
|
||||
filesystem runs full). (Laruence)
|
||||
. Fixed bug #71245 (file_get_contents() ignores "header" context option if
|
||||
it's a reference). (Laruence)
|
||||
. Fixed bug #71220 (Null pointer deref (segfault) in compact via ob_start).
|
||||
(hugh at allthethings dot co dot nz)
|
||||
. Fixed bug #71190 (substr_replace converts integers in original $search
|
||||
array to strings). (Laruence)
|
||||
. Fixed bug #71188 (str_replace converts integers in original $search array
|
||||
to strings). (Laruence)
|
||||
. Fixed bug #71132, #71197 (range() segfaults). (Thomas Punt)
|
||||
|
||||
- WDDX:
|
||||
. Fixed bug #71335 (Type Confusion in WDDX Packet Deserialization). (Stas)
|
||||
|
||||
07 Jan 2016 PHP 7.0.2
|
||||
|
||||
- Core:
|
||||
@@ -34,16 +117,16 @@ PHP NEWS
|
||||
- Filter:
|
||||
. Fixed bug #71063 (filter_input(INPUT_ENV, ..) does not work). (Reeze Xia)
|
||||
|
||||
- FTP:
|
||||
. Implemented FR #55651 (Option to ignore the returned FTP PASV address).
|
||||
(abrender at elitehosts dot com)
|
||||
- GD:
|
||||
. Fixed bug #70976 (Memory Read via gdImageRotateInterpolated Array Index
|
||||
Out of Bounds). (emmanuel dot law at gmail dot com).
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #70755 (fpm_log.c memory leak and buffer overflow). (Stas)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #70976 (Memory Read via gdImageRotateInterpolated Array Index
|
||||
Out of Bounds). (emmanuel dot law at gmail dot com).
|
||||
- FTP:
|
||||
. Implemented FR #55651 (Option to ignore the returned FTP PASV address).
|
||||
(abrender at elitehosts dot com)
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #71066 (mb_send_mail: Program terminated with signal SIGSEGV,
|
||||
@@ -87,7 +170,7 @@ PHP NEWS
|
||||
|
||||
- Core:
|
||||
. Fixed bug #71105 (Format String Vulnerability in Class Name Error Message).
|
||||
(andrew at jmpesp dot org)
|
||||
(CVE-2015-8617) (andrew at jmpesp dot org)
|
||||
. Fixed bug #70831 (Compile fails on system with 160 CPUs). (Daniel Axtens)
|
||||
. Fixed bug #71006 (symbol referencing errors on Sparc/Solaris). (Dmitry)
|
||||
. Fixed bug #70997 (When using parentClass:: instead of parent::, static
|
||||
@@ -120,7 +203,7 @@ PHP NEWS
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #71020 (Use after free in Collator::sortWithSortKeys).
|
||||
(emmanuel dot law at gmail dot com, Laruence)
|
||||
(CVE-2015-8616) (emmanuel dot law at gmail dot com, Laruence)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction).
|
||||
@@ -141,6 +224,9 @@ PHP NEWS
|
||||
. Fixed bug #70977 (Segmentation fault with opcache.huge_code_pages=1).
|
||||
(Laruence)
|
||||
|
||||
- PDO_Firebird:
|
||||
. Fixed bug #60052 (Integer returned as a 64bit integer on X64_86). (Mariuz)
|
||||
|
||||
- Phpdbg:
|
||||
. Fixed stderr being written to stdout. (Bob)
|
||||
|
||||
@@ -150,6 +236,10 @@ PHP NEWS
|
||||
. Fixed bug #70982 (setStaticPropertyValue behaviors inconsistently with
|
||||
5.6). (Laruence)
|
||||
|
||||
- Soap:
|
||||
. Fixed bug #70993 (Array key references break argument processing).
|
||||
(Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #71028 (Undefined index with ArrayIterator). (Laruence)
|
||||
|
||||
@@ -166,13 +256,6 @@ PHP NEWS
|
||||
- Streams/Socket:
|
||||
. Add IPV6_V6ONLY constant / make it usable in stream contexts. (Bob)
|
||||
|
||||
- Soap:
|
||||
. Fixed bug #70993 (Array key references break argument processing).
|
||||
(Laruence)
|
||||
|
||||
- PDO_Firebird:
|
||||
. Fixed bug #60052 (Integer returned as a 64bit integer on X64_86). (Mariuz)
|
||||
|
||||
03 Dec 2015, PHP 7.0.0
|
||||
|
||||
- Core:
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2015 The PHP Group |
|
||||
| Copyright (c) 1997-2016 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-2015 The PHP Group |
|
||||
| Copyright (c) 1997-2016 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-2015 The PHP Group |
|
||||
| Copyright (c) 1997-2016 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-2015 The PHP Group |
|
||||
| Copyright (c) 1997-2016 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,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #42802 (Namespace not supported in typehints)
|
||||
Bug #42802 (Namespace not supported in types)
|
||||
--FILE--
|
||||
<?php
|
||||
namespace foo;
|
||||
|
||||
@@ -5,4 +5,4 @@ Bug #69767 (Default parameter value with wrong type segfaults)
|
||||
function foo(String $bar = 0) {}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Default value for parameters with a string type hint can only be string or NULL in %sbug69767.php on line %d
|
||||
Fatal error: Default value for parameters with a string type can only be string or NULL in %sbug69767.php on line %d
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #70083 (Use after free with assign by ref to overloaded objects)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class foo {
|
||||
private $var;
|
||||
function __get($e) {
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
function &noref() { $foo = 1; return $foo; }
|
||||
|
||||
$foo = new foo;
|
||||
$foo->i = &noref();
|
||||
var_dump($foo);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #71221 (Null pointer deref (segfault) in get_defined_vars via ob_start)
|
||||
--FILE--
|
||||
<?php
|
||||
ob_start("get_defined_vars");
|
||||
ob_end_clean();
|
||||
?>
|
||||
okey
|
||||
--EXPECT--
|
||||
okey
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #71248 (Wrong interface is enforced)
|
||||
--FILE--
|
||||
<?php
|
||||
class Hint1 { }
|
||||
class Hint2 { }
|
||||
|
||||
abstract class Base {
|
||||
public function __construct(Hint1 $x) { }
|
||||
}
|
||||
|
||||
interface Iface {
|
||||
public function __construct(Hint1 $x);
|
||||
}
|
||||
|
||||
class Foo extends Base implements Iface {
|
||||
}
|
||||
|
||||
$code = <<<'PHP'
|
||||
abstract class Bar extends Base {
|
||||
public function __construct(Hint2 $x) { }
|
||||
}
|
||||
PHP;
|
||||
eval($code);
|
||||
?>
|
||||
OK
|
||||
--EXPECT--
|
||||
OK
|
||||
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #71275 (Bad method called on cloning an object having a trait)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
trait MyTrait {
|
||||
public function _() {
|
||||
throw new RuntimeException('Should not be called');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MyClass {
|
||||
use MyTrait;
|
||||
|
||||
public function __clone() {
|
||||
echo "I'm working hard to clone";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$instance = new MyClass();
|
||||
clone $instance;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
I'm working hard to clone
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #71300 (Segfault in zend_fetch_string_offset)
|
||||
--FILE--
|
||||
<?php
|
||||
function test1() {
|
||||
for ($n = 'a'; $n < 'g'; $n++) {
|
||||
$$n = 1;
|
||||
}
|
||||
$$n = $$n[++$n] = "test";
|
||||
return $$n;
|
||||
}
|
||||
|
||||
var_dump(test1());
|
||||
|
||||
function test2() {
|
||||
/* See #71303 for why not using for loop here */
|
||||
$n = "a";
|
||||
$$n .= $$n[++$n] = "test";
|
||||
return $$n;
|
||||
}
|
||||
|
||||
var_dump(test2());
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(4) "test"
|
||||
|
||||
Notice: Array to string conversion in %sbug71300.php on line %d
|
||||
string(9) "Arraytest"
|
||||
@@ -0,0 +1,48 @@
|
||||
--TEST--
|
||||
Bug #71336 (Wrong is_ref on properties as exposed via get_object_vars())
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
{
|
||||
protected $bar = array('baz');
|
||||
|
||||
function bar()
|
||||
{
|
||||
array_pop($this->bar);
|
||||
$vars = get_object_vars($this);
|
||||
$this->bar[] = array('buz');
|
||||
print_r($vars);
|
||||
}
|
||||
|
||||
function foo() {
|
||||
array_pop($this->bar);
|
||||
$dummy = &$this->bar;
|
||||
$vars = get_object_vars($this);
|
||||
$this->bar[] = array('buz');
|
||||
print_r($vars);
|
||||
}
|
||||
}
|
||||
|
||||
(new A())->bar();
|
||||
(new A())->foo();
|
||||
?>
|
||||
--EXPECT--
|
||||
Array
|
||||
(
|
||||
[bar] => Array
|
||||
(
|
||||
)
|
||||
|
||||
)
|
||||
Array
|
||||
(
|
||||
[bar] => Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[0] => buz
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Closure 059: Closure type hinting
|
||||
Closure 059: Closure type declaration
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
errmsg: default value for parameters with array type hint can only be an array or NULL
|
||||
errmsg: default value for parameters with array type can only be an array or NULL
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -11,4 +11,4 @@ class test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Default value for parameters with array type hint can only be an array or NULL in %s on line %d
|
||||
Fatal error: Default value for parameters with array type can only be an array or NULL in %s on line %d
|
||||
@@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Bug #71297 (Memory leak with consecutive yield from)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function foo() {
|
||||
yield array_fill(0, 10000, 4);
|
||||
}
|
||||
|
||||
function genLeak() {
|
||||
$i = 0;
|
||||
while (1) {
|
||||
yield from foo();
|
||||
print $i++;
|
||||
}
|
||||
}
|
||||
|
||||
$x = 0;
|
||||
foreach (genLeak() as $i) {
|
||||
if ($x++ == 3) break;
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
012
|
||||
@@ -58,7 +58,7 @@ $gen->next();
|
||||
var_dump($gen->getReturn());
|
||||
|
||||
// Explicit value-less return also results in a NULL generator
|
||||
// return value and there is no interference with type hints
|
||||
// return value and there is no interference with type declarations
|
||||
function gen6() : Generator {
|
||||
return;
|
||||
yield 24;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
int memory_get_peak_usage ([ bool $real_usage = false ] );
|
||||
--CREDITS--
|
||||
marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
|
||||
--INI--
|
||||
memory_limit=-1
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump($a = memory_get_peak_usage());
|
||||
var_dump(memory_get_peak_usage(true));
|
||||
var_dump(memory_get_peak_usage(false));
|
||||
$array = range(1,1024*1024);
|
||||
var_dump(memory_get_peak_usage() > $a);
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(%d)
|
||||
int(%d)
|
||||
int(%d)
|
||||
bool(true)
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
055: typehints in namespaces
|
||||
055: types in namespaces
|
||||
--FILE--
|
||||
<?php
|
||||
namespace test\ns1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Return type hinting for internal functions
|
||||
Return type for internal functions
|
||||
|
||||
--SKIPIF--
|
||||
<?php
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Return type hinting for internal functions 2
|
||||
Return type for internal functions 2
|
||||
|
||||
--SKIPIF--
|
||||
<?php
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Return type hinting and Reflection::export()
|
||||
Return type and Reflection::export()
|
||||
|
||||
--SKIPIF--
|
||||
<?php
|
||||
|
||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Array type hint
|
||||
Array type declaration
|
||||
--FILE--
|
||||
<?php
|
||||
function foo(array $a) {
|
||||
@@ -12,8 +12,8 @@ foo(123);
|
||||
--EXPECTF--
|
||||
3
|
||||
|
||||
Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2
|
||||
Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, integer given, called in %s on line 7 and defined in %s:2
|
||||
Stack trace:
|
||||
#0 %s(%d): foo(123)
|
||||
#1 {main}
|
||||
thrown in %sarray_type_hint_001.php on line 2
|
||||
thrown in %s on line 2
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
callable type hint#001
|
||||
callable type#001
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -21,7 +21,7 @@ foo($closure);
|
||||
string(6) "strpos"
|
||||
string(3) "foo"
|
||||
|
||||
Deprecated: Non-static method bar::baz() should not be called statically in %scallable_type_hint_001.php on line %d
|
||||
Deprecated: Non-static method bar::baz() should not be called statically in %s on line %d
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(3) "bar"
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
callable type hint#002 - Reflection
|
||||
callable type#002 - Reflection
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
callable type hint#003
|
||||
callable type#003
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Closure with variadic type hint
|
||||
Closure with variadic type declaration
|
||||
--FILE--
|
||||
<?php
|
||||
$f = function (stdClass ...$a) {
|
||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Inexistent class as typehint receiving scalar argument
|
||||
Inexistent class as type receiving scalar argument
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint - internal function strict mode
|
||||
Scalar type - internal function strict mode
|
||||
--FILE--
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
@@ -32,4 +32,4 @@ try {
|
||||
*** Trying Array Map With Invalid Callback
|
||||
*** Caught array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
|
||||
*** Trying Strlen With Float
|
||||
*** Caught strlen() expects parameter 1 to be string, float given
|
||||
*** Caught strlen() expects parameter 1 to be string, float given
|
||||
File renamed without changes.
+6
-6
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint basics
|
||||
Scalar type basics
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -45,7 +45,7 @@ $values = [
|
||||
];
|
||||
|
||||
foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
|
||||
echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
|
||||
foreach ($values as $value) {
|
||||
echo PHP_EOL . "*** Trying ";
|
||||
var_dump($value);
|
||||
@@ -60,7 +60,7 @@ echo PHP_EOL . "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Testing 'int' typehint:
|
||||
Testing 'int' type:
|
||||
|
||||
*** Trying int(1)
|
||||
int(1)
|
||||
@@ -114,7 +114,7 @@ int(0)
|
||||
*** Trying resource(%d) of type (stream)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
|
||||
|
||||
Testing 'float' typehint:
|
||||
Testing 'float' type:
|
||||
|
||||
*** Trying int(1)
|
||||
float(1)
|
||||
@@ -168,7 +168,7 @@ float(0)
|
||||
*** Trying resource(%d) of type (stream)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
|
||||
|
||||
Testing 'string' typehint:
|
||||
Testing 'string' type:
|
||||
|
||||
*** Trying int(1)
|
||||
string(1) "1"
|
||||
@@ -221,7 +221,7 @@ string(6) "foobar"
|
||||
*** Trying resource(%d) of type (stream)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
|
||||
|
||||
Testing 'bool' typehint:
|
||||
Testing 'bool' type:
|
||||
|
||||
*** Trying int(1)
|
||||
bool(true)
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint - default via constants
|
||||
Scalar type - default via constants
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -80,4 +80,4 @@ string(14) "this is a test"
|
||||
Testing int with default null constant
|
||||
NULL
|
||||
Testing int with null null constant
|
||||
NULL
|
||||
NULL
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint - default via constants - error condition
|
||||
Scalar type - default via constants - error condition
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -17,4 +17,4 @@ Fatal error: Uncaught TypeError: Argument 1 passed to int_val() must be of the t
|
||||
Stack trace:
|
||||
#0 %s(%d): int_val()
|
||||
#1 {main}
|
||||
thrown in %s on line %d
|
||||
thrown in %s on line %d
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Float type hint should allow an integer as default even with strict types
|
||||
Float type should allow an integer as default even with strict types
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Float type hint should allow an integer as default
|
||||
Float type should allow an integer as default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Float type should not allow invalid types as default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test(float $arg = true)
|
||||
{
|
||||
var_dump($arg);
|
||||
}
|
||||
|
||||
test();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Fatal error: Default value for parameters with a float type can only be float, integer, or NULL in %s on line %d
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint missing parameters
|
||||
Scalar type missing parameters
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint nullability
|
||||
Scalar type nullability
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint - disallow relative typehints
|
||||
Scalar type - disallow relative types
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (2)
|
||||
Scalar type names cannot be used as class, trait or interface names (2)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (2) - class_alias
|
||||
Scalar type names cannot be used as class, trait or interface names (2) - class_alias
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (2) - use
|
||||
Scalar type names cannot be used as class, trait or interface names (2) - use
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (3)
|
||||
Scalar type names cannot be used as class, trait or interface names (3)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (3) - class_alias
|
||||
Scalar type names cannot be used as class, trait or interface names (3) - class_alias
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (3) - use
|
||||
Scalar type names cannot be used as class, trait or interface names (3) - use
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (4)
|
||||
Scalar type names cannot be used as class, trait or interface names (4)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (4) - class_alias
|
||||
Scalar type names cannot be used as class, trait or interface names (4) - class_alias
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (4) - use
|
||||
Scalar type names cannot be used as class, trait or interface names (4) - use
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (6)
|
||||
Scalar type names cannot be used as class, trait or interface names (6)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (6) - class_alias
|
||||
Scalar type names cannot be used as class, trait or interface names (6) - class_alias
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (6) - use
|
||||
Scalar type names cannot be used as class, trait or interface names (6) - use
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint names cannot be used as class, trait or interface names (7)
|
||||
Scalar type names cannot be used as class, trait or interface names (7)
|
||||
--FILE--
|
||||
<?php
|
||||
namespace foo;
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Return scalar type hint basics
|
||||
Return scalar type basics
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
|
||||
--FILE--
|
||||
@@ -48,7 +48,7 @@ $values = [
|
||||
];
|
||||
|
||||
foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
|
||||
echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
|
||||
foreach ($values as $value) {
|
||||
echo "*** Trying ";
|
||||
var_dump($value);
|
||||
@@ -63,7 +63,7 @@ foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL . "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Testing 'int' typehint:
|
||||
Testing 'int' type:
|
||||
*** Trying int(1)
|
||||
int(1)
|
||||
*** Trying string(1) "1"
|
||||
@@ -101,7 +101,7 @@ int(0)
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Return value of {closure}() must be of the type integer, resource returned in %s on line %d
|
||||
|
||||
Testing 'float' typehint:
|
||||
Testing 'float' type:
|
||||
*** Trying int(1)
|
||||
float(1)
|
||||
*** Trying string(1) "1"
|
||||
@@ -139,7 +139,7 @@ float(0)
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d
|
||||
|
||||
Testing 'string' typehint:
|
||||
Testing 'string' type:
|
||||
*** Trying int(1)
|
||||
string(1) "1"
|
||||
*** Trying string(1) "1"
|
||||
@@ -176,7 +176,7 @@ string(6) "foobar"
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d
|
||||
|
||||
Testing 'bool' typehint:
|
||||
Testing 'bool' type:
|
||||
*** Trying int(1)
|
||||
bool(true)
|
||||
*** Trying string(1) "1"
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Return scalar type hint basics
|
||||
Return scalar type basics
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
|
||||
--FILE--
|
||||
@@ -48,7 +48,7 @@ $values = [
|
||||
];
|
||||
|
||||
foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
|
||||
echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
|
||||
foreach ($values as $value) {
|
||||
echo "*** Trying ";
|
||||
var_dump($value);
|
||||
@@ -63,7 +63,7 @@ foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL . "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Testing 'int' typehint:
|
||||
Testing 'int' type:
|
||||
*** Trying int(1)
|
||||
int(1)
|
||||
*** Trying string(1) "1"
|
||||
@@ -101,7 +101,7 @@ int(0)
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Return value of {closure}() must be of the type integer, resource returned in %s on line %d
|
||||
|
||||
Testing 'float' typehint:
|
||||
Testing 'float' type:
|
||||
*** Trying int(1)
|
||||
float(1)
|
||||
*** Trying string(1) "1"
|
||||
@@ -139,7 +139,7 @@ float(0)
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d
|
||||
|
||||
Testing 'string' typehint:
|
||||
Testing 'string' type:
|
||||
*** Trying int(1)
|
||||
string(1) "1"
|
||||
*** Trying string(1) "1"
|
||||
@@ -176,7 +176,7 @@ string(6) "foobar"
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d
|
||||
|
||||
Testing 'bool' typehint:
|
||||
Testing 'bool' type:
|
||||
*** Trying int(1)
|
||||
bool(true)
|
||||
*** Trying string(1) "1"
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint strict mode
|
||||
Scalar type strict mode
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
|
||||
--FILE--
|
||||
@@ -49,7 +49,7 @@ $values = [
|
||||
];
|
||||
|
||||
foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
|
||||
echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
|
||||
foreach ($values as $value) {
|
||||
echo PHP_EOL . "*** Trying ";
|
||||
var_dump($value);
|
||||
@@ -64,7 +64,7 @@ foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL . "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Testing 'int' typehint:
|
||||
Testing 'int' type:
|
||||
|
||||
*** Trying int(1)
|
||||
int(1)
|
||||
@@ -117,7 +117,7 @@ int(2147483647)
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
|
||||
|
||||
Testing 'float' typehint:
|
||||
Testing 'float' type:
|
||||
|
||||
*** Trying int(1)
|
||||
float(1)
|
||||
@@ -170,7 +170,7 @@ float(NAN)
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
|
||||
|
||||
Testing 'string' typehint:
|
||||
Testing 'string' type:
|
||||
|
||||
*** Trying int(1)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type string, integer given, called in %s on line %d
|
||||
@@ -223,7 +223,7 @@ string(0) ""
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
|
||||
|
||||
Testing 'bool' typehint:
|
||||
Testing 'bool' type:
|
||||
|
||||
*** Trying int(1)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type boolean, integer given, called in %s on line %d
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Scalar type hint strict mode
|
||||
Scalar type strict mode
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
|
||||
--FILE--
|
||||
@@ -49,7 +49,7 @@ $values = [
|
||||
];
|
||||
|
||||
foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
|
||||
echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
|
||||
foreach ($values as $value) {
|
||||
echo PHP_EOL . "*** Trying ";
|
||||
var_dump($value);
|
||||
@@ -64,7 +64,7 @@ foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL . "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Testing 'int' typehint:
|
||||
Testing 'int' type:
|
||||
|
||||
*** Trying int(1)
|
||||
int(1)
|
||||
@@ -117,7 +117,7 @@ int(9223372036854775807)
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
|
||||
|
||||
Testing 'float' typehint:
|
||||
Testing 'float' type:
|
||||
|
||||
*** Trying int(1)
|
||||
float(1)
|
||||
@@ -170,7 +170,7 @@ float(NAN)
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
|
||||
|
||||
Testing 'string' typehint:
|
||||
Testing 'string' type:
|
||||
|
||||
*** Trying int(1)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type string, integer given, called in %s on line %d
|
||||
@@ -223,7 +223,7 @@ string(0) ""
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
|
||||
|
||||
Testing 'bool' typehint:
|
||||
Testing 'bool' type:
|
||||
|
||||
*** Trying int(1)
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type boolean, integer given, called in %s on line %d
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Strict scalar type hint basics
|
||||
Strict scalar type basics
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -48,7 +48,7 @@ function type($value) {
|
||||
}
|
||||
|
||||
foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
|
||||
echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
|
||||
foreach ($values as $value) {
|
||||
$errored = false;
|
||||
echo PHP_EOL . "*** Trying ", type($value), " value", PHP_EOL;
|
||||
@@ -62,7 +62,7 @@ foreach ($functions as $type => $function) {
|
||||
echo PHP_EOL . "Done";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Testing 'int' typehint:
|
||||
Testing 'int' type:
|
||||
|
||||
*** Trying integer value
|
||||
int(1)
|
||||
@@ -91,7 +91,7 @@ int(1)
|
||||
*** Trying resource value
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
|
||||
|
||||
Testing 'float' typehint:
|
||||
Testing 'float' type:
|
||||
|
||||
*** Trying integer value
|
||||
float(1)
|
||||
@@ -120,7 +120,7 @@ float(1)
|
||||
*** Trying resource value
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
|
||||
|
||||
Testing 'string' typehint:
|
||||
Testing 'string' type:
|
||||
|
||||
*** Trying integer value
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type string, integer given, called in %s on line %d
|
||||
@@ -149,7 +149,7 @@ string(1) "1"
|
||||
*** Trying resource value
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
|
||||
|
||||
Testing 'bool' typehint:
|
||||
Testing 'bool' type:
|
||||
|
||||
*** Trying integer value
|
||||
*** Caught Argument 1 passed to {closure}() must be of the type boolean, integer given, called in %s on line %d
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Weak scalar type hints, with references
|
||||
Weak scalar types, with references
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -12,7 +12,7 @@ function to_bool(bool &$x) {}
|
||||
|
||||
$x = 1.0;
|
||||
var_dump($x);
|
||||
to_int($x); // because $x is by-reference, the weak type hint converts it
|
||||
to_int($x); // because $x is by-reference, the weak type converts it
|
||||
var_dump($x);
|
||||
to_float($x);
|
||||
var_dump($x);
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Float type hint should not allow invalid types as default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test(float $arg = true)
|
||||
{
|
||||
var_dump($arg);
|
||||
}
|
||||
|
||||
test();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Fatal error: Default value for parameters with a float type hint can only be float, integer, or NULL in %s on line %d
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Variadic arguments enforce typehints
|
||||
Variadic arguments enforce types
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Error suppression for typehints on variadic arguments works
|
||||
Error suppression for types on variadic arguments works
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies\n"
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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-2015 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2016 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 |
|
||||
@@ -1198,8 +1198,12 @@ ZEND_FUNCTION(get_object_vars)
|
||||
ZEND_HASH_FOREACH_STR_KEY_VAL_IND(properties, key, value) {
|
||||
if (key) {
|
||||
if (zend_check_property_access(zobj, key) == SUCCESS) {
|
||||
/* Not separating references */
|
||||
if (Z_REFCOUNTED_P(value)) Z_ADDREF_P(value);
|
||||
if (Z_ISREF_P(value) && Z_REFCOUNT_P(value) == 1) {
|
||||
value = Z_REFVAL_P(value);
|
||||
}
|
||||
if (Z_REFCOUNTED_P(value)) {
|
||||
Z_ADDREF_P(value);
|
||||
}
|
||||
if (ZSTR_VAL(key)[0] == 0) {
|
||||
const char *prop_name, *class_name;
|
||||
size_t prop_len;
|
||||
@@ -1947,6 +1951,10 @@ ZEND_FUNCTION(get_defined_vars)
|
||||
{
|
||||
zend_array *symbol_table = zend_rebuild_symbol_table();
|
||||
|
||||
if (UNEXPECTED(symbol_table == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_ARR(zend_array_dup(symbol_table));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
Loaded 100 of 1118 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user