Commit 77c937cb96e for php

commit 77c937cb96e0efb98961e6dfa1f4f7f76290a856
Merge: 18c5dfa60e5 0de6e7a6efc
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date:   Tue Dec 1 12:37:53 2026 -0500

    Merge branch 'PHP-8.5' into PHP-8.6

    * PHP-8.5:
      Zend/Optimizer: Keep float + 0.0 that can turn -0.0 into 0.0

diff --cc NEWS
index ff9b247d7b8,cf89347894c..64416fba903
--- a/NEWS
+++ b/NEWS
@@@ -209,19 -180,12 +209,21 @@@ PH
    . Fixed bug GH-24319 (zend_accel_hash_update() links new entries without a
      release barrier). (Levi Morrison)
    . Fixed JIT leaving state after killed processes. (dunglas)
+   . Fixed bug GH-25744 (Optimizer folds $float + 0.0 to a copy, giving wrong
+     result for -0.0). (ChrisAbner)

  - OpenSSL:
 +  . Fixed bug GH-25172 (TLS session reuse shares request-lifetime callback
 +    structures with persistent streams). (cxxz16, David Carlier)
 +  . Fixed an exception thrown by the session_get_cb stream context callback
 +    being replaced with a TypeError. (Ilia Alshanetsky)
 +  . Fixed use-after-free when a stream is closed by the callback for
 +    `early_data_cb`, `psk_client_cb`, `psk_server_cb`, `session_get_cb`, or
 +    `session_new_cb`. (DanielEScherzer)
    . Fixed bug GH-20920 (LibreSSL build regression with PHP 8.5).
      (Eugene Gvozdetsky, Theo Buehler, Jakub Zelenka)
 +  . Fixed SNI_server_certs being ignored on a server stream that reuses the
 +    SSL context of a session stream. (Jakub Zelenka)

  - PDO:
    . Fixed bug GH-25650 (PDO::query() reports the wrong argument numbers for
diff --cc Zend/Optimizer/dfa_pass.c
index 93dae48a03e,4d0c3bc1003..a0d15a3cca2
--- a/Zend/Optimizer/dfa_pass.c
+++ b/Zend/Optimizer/dfa_pass.c
@@@ -1054,9 -1031,13 +1054,13 @@@ static bool zend_dfa_try_to_replace_res
  		}
  	}

 -	return 0;
 +	return false;
  }

+ /* Compared bitwise with memcmp(), so that 0.0 and -0.0 are told apart */
+ static const double neg_zero = -0.0;
+ static const double pos_zero = 0.0;
+
  void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *ssa, zend_call_info **call_map)
  {
  	if (ctx->debug_level & ZEND_DUMP_BEFORE_DFA_PASS) {