Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ae92b85
Fix linking ext/curl against OpenSSL (#13262)
petk Feb 14, 2024
c772963
Merge branch 'PHP-8.3' into PHP-8.4
bukka Jun 6, 2025
a8b7c65
Merge branch 'PHP-8.4'
bukka Jun 6, 2025
01abca9
[skip ci ] fix: deleted stray semicolon (GH-18782)
NickSdot Jun 6, 2025
cce0efd
Revert "ext/pdo_pgsql: Delete unused constants"
devnexen Jun 6, 2025
d15c61e
ext/gettext: fixed typo in config.m4 (#18790)
NickSdot Jun 7, 2025
1044558
ext/pdo_sqlite: createCollation memory leaks fix.
devnexen Jun 7, 2025
b72dccb
Merge branch 'PHP-8.4'
devnexen Jun 7, 2025
ceffa70
ext/pdo_sqlite: Fix GH-18796 test exception message. (#18798)
devnexen Jun 7, 2025
cb04226
Avoid making a redundant copy in php_filter_callback() (#18794)
ndossche Jun 8, 2025
eac91d0
[ci skip] Fix UPGRADING formatting
ndossche Jun 8, 2025
e3cfa4b
ext/pdo_sqlite: PDO::sqliteCreateCollection return type strenghtening.
devnexen Jun 7, 2025
1a18012
zend_vm_gen: Fix GET_OP*_OBJ_ZVAL_PTR_DEREF for ANY (#18746)
TimWolla Jun 9, 2025
31b4f39
Use ZVAL_NEW_STR() for new string in php_filter_encode_html()
ndossche Jun 7, 2025
c02f6fb
Output blocks of safe chars in php_filter_encode_html()
ndossche Jun 7, 2025
4852a2c
pdo_dblib: Use stack local array instead of heap allocation (#18801)
ndossche Jun 9, 2025
9a9d98e
Do not delete main chunk in zend_gc
danog Jun 4, 2025
ef92e06
Fix memory leak on php_odbc_fetch_hash() failure
ndossche Jun 6, 2025
786090b
pdo_odbc: Fix memory leak if WideCharToMultiByte() fails
ndossche Jun 6, 2025
5526301
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Jun 9, 2025
502c682
Merge branch 'PHP-8.4'
ndossche Jun 9, 2025
b3c8afe
Fix GH-18743: Incompatibility in Inline TLS Assembly on Alpine 3.22
ndossche Jun 5, 2025
7a0beb4
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Jun 9, 2025
4c72203
Merge branch 'PHP-8.4'
ndossche Jun 9, 2025
4f0554f
Properly handle __debugInfo() returning an array reference
ndossche Jun 4, 2025
b41a8aa
[ci skip] Fix NEWS location
ndossche Jun 9, 2025
7b6c0b9
zend_alloc: Fix compilation with ZEND_MM_CUSTOM=0 (#18808)
ndossche Jun 9, 2025
186a811
Fix test conflict between copy_variation2-win32-mb.phpt and copy_vari…
ndossche Jun 9, 2025
d6258d6
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Jun 9, 2025
5b85b1a
Merge branch 'PHP-8.4'
ndossche Jun 9, 2025
d11f971
zend_alloc: Fix compile with ZEND_MM_STAT=0
ndossche Jun 9, 2025
fc89d19
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Jun 9, 2025
8a3201d
Merge branch 'PHP-8.4'
ndossche Jun 9, 2025
53231a8
ext/pdo_sqlite: adding Pdo_Sqlite::ATTR_BUSY_STATEMENT
devnexen Jun 8, 2025
931ee4b
[ci skip] Re-add accidentally removed NEWS entry
ndossche Jun 9, 2025
e118147
release-process: update pre-release cycle docs (#18805)
DanielEScherzer Jun 9, 2025
fe3bea0
Fix technically incorrect sizeof
ndossche Jun 9, 2025
4f233e3
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Jun 9, 2025
32c6ac9
Merge branch 'PHP-8.4'
ndossche Jun 9, 2025
3e37bce
[skip ci] Trim trailing whitespace in zend_compile.c
TimWolla Jun 10, 2025
2036c71
[skip ci] Add T_VOID_CAST constant to UPGRADING
TimWolla Jun 10, 2025
1c09c0c
RFC: Pipe operator (#17118)
Crell Jun 10, 2025
7d24cce
Update Lexbor
kocsismate Jun 10, 2025
3399235
Add Uri\WhatWg classes to ext/uri (#18672)
kocsismate Jun 10, 2025
5f9a0b5
gen_stub: Fix undefined variable warning (#18821)
TimWolla Jun 10, 2025
8f3e555
Use zval_try_get_string_func() in concat_function() (#18815)
ndossche Jun 10, 2025
594221f
cli: Fix tests/bug80092.phpt expectation for `PHP_BUILD_PROVIDER` (#1…
TimWolla Jun 10, 2025
eb151e3
Properly handle reference return value from __toString()
ndossche Jun 9, 2025
5740607
Merge branch 'PHP-8.4'
TimWolla Jun 10, 2025
0cd3ebf
Fix 'phpdbg --help' segfault on shutdown with USE_ZEND_ALLOC=0
ndossche Jun 9, 2025
6685414
Merge branch 'PHP-8.3' into PHP-8.4
ndossche Jun 10, 2025
7f3a2bc
Merge branch 'PHP-8.4'
ndossche Jun 10, 2025
0a95b2f
Fix GH-18820: Windows compilation issue: php-src\Zend\zend_exceptions…
ndossche Jun 10, 2025
559858c
Improve performance of unpack() with nameless repetitions (#18803)
ndossche Jun 10, 2025
dbabbe1
Remove dead code from openssl_spki_new() implementation (#18752)
ndossche Jun 10, 2025
2a77e28
ext/standard/pack: Inline constant single use variables
Girgias Jun 10, 2025
e96a7f0
ext/standard/pack: Remove useless casts
Girgias Jun 10, 2025
34e22c5
ext/standard/pack: Reduce scope of variable
Girgias Jun 10, 2025
a297a44
ext/standard/pack: Remove unused header includes
Girgias Jun 10, 2025
def3a95
[skip ci] ext/standard/pack: Fix indentation to use tabs
Girgias Jun 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ PHP NEWS
evaluation) and GH-18464 (Recursion protection for deprecation constants not
released on bailout). (DanielEScherzer and ilutov)
. Fixed AST printing for immediately invoked Closure. (Dmitrii Derepko)
. Properly handle __debugInfo() returning an array reference. (nielsdos)
. Properly handle reference return value from __toString(). (nielsdos)
. Added the pipe (|>) operator. (crell)

- Curl:
. Added curl_multi_get_handles(). (timwolla)
Expand Down Expand Up @@ -137,11 +140,14 @@ PHP NEWS
. Implement GH-15387 Pdo\Pgsql::setAttribute(PDO::ATTR_PREFETCH, 0) or
Pdo\Pgsql::prepare(…, [ PDO::ATTR_PREFETCH => 0 ]) make fetch() lazy
instead of storing the whole result set in memory (Guillaume Outters)
. Removed unused constants Pdo\Pgsql::TRANSACTION_* (vrana).

- PDO_SQLITE:
. throw on null bytes / resolve GH-13952 (divinity76).
. Implement GH-17321: Add setAuthorizer to Pdo\Sqlite. (nielsdos)
. PDO::sqliteCreateCollation now throws a TypeError if the callback
has a wrong return type. (David Carlier)
. Added Pdo_Sqlite::ATTR_BUSY_STATEMENT constant to check
if a statement is currently executing. (David Carlier)

- PGSQL:
. Added pg_close_stmt to close a prepared statement while allowing
Expand Down
22 changes: 18 additions & 4 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ PHP 8.5 UPGRADE NOTES
. A ValueError is now thrown when trying to set a cursor name that is too
long on a PDOStatement resulting from the Firebird driver.

- PDO_PGSQL:
. Removed unused constants Pdo\Pgsql::TRANSACTION_*.

- Session:
. Attempting to write session data where $_SESSION has a key containing
the pipe character will now emit a warning instead of silently failing.
Expand Down Expand Up @@ -147,6 +144,8 @@ PHP 8.5 UPGRADE NOTES
RFC: https://wiki.php.net/rfc/attributes-on-constants
. The #[\Deprecated] attribute can now be used on constants.
RFC: https://wiki.php.net/rfc/attributes-on-constants
. Added the pipe (|>) operator.
RFC: https://wiki.php.net/rfc/pipe-operator-v3

- Curl:
. Added support for share handles that are persisted across multiple PHP
Expand Down Expand Up @@ -197,6 +196,9 @@ PHP 8.5 UPGRADE NOTES
IntlListFormatter::WIDTH_NARROW widths.
It is supported from icu 67.

- PDO_Sqlite:
. Added class constant Pdo_Sqlite::ATTR_BUSY_STATEMENT.

- SOAP:
. Enumeration cases are now dumped in __getTypes().

Expand Down Expand Up @@ -271,6 +273,9 @@ PHP 8.5 UPGRADE NOTES
- PDO_SQLITE:
. SQLite PDO::quote() will now throw an exception or emit a warning,
depending on the error mode, if the string contains a null byte.
. PDO::sqliteCreateCollation will now throw an exception
if the callback has the wrong return type, making it more
in line with Pdo_Sqlite::createCollation behavior.

- PGSQL:
. pg_copy_from also supports inputs as Iterable.
Expand Down Expand Up @@ -424,6 +429,9 @@ PHP 8.5 UPGRADE NOTES
- PCRE:
. Upgraded to pcre2lib from 10.44 to 10.45.

- PDO_Sqlite:
. Increased minimum release version support from 3.7.7 to 3.7.17.

- Readline:
. The return types of readline_add_history(), readline_clear_history(), and
readline_callback_handler_install() have been changed to true, rather
Expand Down Expand Up @@ -468,6 +476,10 @@ PHP 8.5 UPGRADE NOTES
- SHUT_WR.
- SHUT_RDWR.

- Tokenizer:
. T_VOID_CAST.
. T_PIPE.

========================================
11. Changes to INI File Handling
========================================
Expand Down Expand Up @@ -555,7 +567,7 @@ PHP 8.5 UPGRADE NOTES
. Now avoids creating extra string copies when converting strings
for use in the collator.

MBString:
- MBString:
. The parts of the code that used SSE2 have been adapted to use SIMD
with ARM NEON as well.

Expand All @@ -570,6 +582,8 @@ MBString:
. Improved performance of array functions with callbacks
(array_find, array_filter, array_map, usort, ...).
. Improved performance of urlencode() and rawurlencode().
. Improved unpack() performance with nameless repetitions by avoiding
creating temporary strings and reparsing them.

- XMLReader:
. Improved property access performance.
Expand Down
3 changes: 3 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ PHP 8.5 INTERNALS UPGRADE NOTES
. Added ZEND_NONSTRING attribute macro for character arrays that do not
represent strings. This allows to silence the GCC 15.x
`-Wunterminated-string-initialization` warning.
. Added the zend_update_exception_properties() function for instantiating
Exception child classes. It updates the $message, $code, and $previous
properties.

========================
2. Build system changes
Expand Down
22 changes: 22 additions & 0 deletions Zend/tests/__debugInfo_reference.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--TEST--
__debugInfo with reference return
--FILE--
<?php

class Test {
private $tmp = ['x' => 1];

public function &__debugInfo(): array
{
return $this->tmp;
}
}

var_dump(new Test);

?>
--EXPECT--
object(Test)#1 (1) {
["x"]=>
int(1)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
Exception fatal uncaught error with reference __toString
--FILE--
<?php

class MyException extends Exception {
private $field = 'my string';
public function &__toString(): string {
return $this->field;
}
}

// Must not be caught to trigger the issue!
throw new MyException;

?>
--EXPECTF--
Fatal error: Uncaught my string
thrown in %s on line %d
13 changes: 13 additions & 0 deletions Zend/tests/gh18756.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--TEST--
Bug GH-18756: Zend MM may delete the main chunk
--EXTENSIONS--
zend_test
--FILE--
<?php

zend_test_gh18756();

?>
==DONE==
--EXPECT--
==DONE==
109 changes: 109 additions & 0 deletions Zend/tests/pipe_operator/ast.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
--TEST--
A pipe operator displays as a pipe operator when outputting syntax, with correct parens.
--FILE--
<?php

print "Concat, which binds higher\n";

try {
assert(false && foo() . bar() |> baz() . quux());
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && (foo() . bar()) |> baz() . quux());
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && foo() . (bar() |> baz()) . quux());
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && foo() . bar() |> (baz() . quux()));
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && (foo() . bar() |> baz()) . quux());
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && foo() . (bar() |> baz() . quux()));
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

print "<, which binds lower\n";

try {
assert(false && foo() < bar() |> baz());
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && (foo() < bar()) |> baz());
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && foo() < (bar() |> baz()));
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && foo() |> bar() < baz());
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && (foo() |> bar()) < baz());
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

try {
assert(false && foo() |> (bar() < baz()));
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}



print "misc examples\n";

try {
assert(false && foo() |> (bar() |> baz(...)));
} catch (AssertionError $e) {
echo $e->getMessage(), PHP_EOL;
}

?>
--EXPECT--
Concat, which binds higher
assert(false && foo() . bar() |> baz() . quux())
assert(false && foo() . bar() |> baz() . quux())
assert(false && foo() . (bar() |> baz()) . quux())
assert(false && foo() . bar() |> baz() . quux())
assert(false && (foo() . bar() |> baz()) . quux())
assert(false && foo() . (bar() |> baz() . quux()))
<, which binds lower
assert(false && foo() < bar() |> baz())
assert(false && (foo() < bar()) |> baz())
assert(false && foo() < bar() |> baz())
assert(false && foo() |> bar() < baz())
assert(false && foo() |> bar() < baz())
assert(false && foo() |> (bar() < baz()))
misc examples
assert(false && foo() |> (bar() |> baz(...)))
37 changes: 37 additions & 0 deletions Zend/tests/pipe_operator/call_by_ref.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
--TEST--
Pipe operator rejects by-reference functions.
--FILE--
<?php

function _modify(int &$a): string {
$a += 1;
return "foo";
}

function _append(array &$a): string {
$a['bar'] = 'beep';
}

// Simple variables
try {
$a = 5;
$res1 = $a |> _modify(...);
var_dump($res1);
} catch (\Error $e) {
echo $e->getMessage(), PHP_EOL;
}

// Complex variables.
try {
$a = ['foo' => 'beep'];
$res2 = $a |> _append(...);
var_dump($res2);
} catch (\Error $e) {
echo $e->getMessage(), PHP_EOL;
}


?>
--EXPECTF--
_modify(): Argument #1 ($a) could not be passed by reference
_append(): Argument #1 ($a) could not be passed by reference
17 changes: 17 additions & 0 deletions Zend/tests/pipe_operator/call_prefer_by_ref.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--TEST--
Pipe operator accepts prefer-by-reference functions.
--FILE--
<?php

$a = ['hello', 'world'];

try {
$r = $a |> array_multisort(...);
var_dump($r);
} catch (\Error $e) {
echo $e->getMessage(), PHP_EOL;
}

?>
--EXPECT--
bool(true)
20 changes: 20 additions & 0 deletions Zend/tests/pipe_operator/complex_ordering.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--TEST--
Functions are executed in the expected order
--FILE--
<?php

function foo() { echo __FUNCTION__, PHP_EOL; return 1; }
function bar() { echo __FUNCTION__, PHP_EOL; return false; }
function baz($in) { echo __FUNCTION__, PHP_EOL; return $in; }
function quux($in) { echo __FUNCTION__, PHP_EOL; return $in; }

$result = foo()
|> (bar() ? baz(...) : quux(...))
|> var_dump(...);

?>
--EXPECT--
foo
bar
quux
int(1)
19 changes: 19 additions & 0 deletions Zend/tests/pipe_operator/compound_userland_calls.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
Pipe operator chains
--FILE--
<?php

function _test1(int $a): int {
return $a + 1;
}

function _test2(int $a): int {
return $a * 2;
}

$res1 = 5 |> '_test1' |> '_test2';

var_dump($res1);
?>
--EXPECT--
int(12)
Loading