1PHP 7.0 UPGRADE NOTES 2 31. Backward Incompatible Changes 42. New Features 53. Changes in SAPI modules 64. Deprecated Functionality 75. Changed Functions 86. New Functions 97. New Classes and Interfaces 108. Removed Extensions and SAPIs 119. Other Changes to Extensions 1210. New Global Constants 1311. Changes to INI File Handling 1412. Windows Support 1513. Other Changes 16 17 18======================================== 191. Backward Incompatible Changes 20======================================== 21 22Language changes 23================ 24 25Changes to variable handling 26---------------------------- 27 28* Indirect variable, property and method references are now interpreted with 29 left-to-right semantics. Some examples: 30 31 $$foo['bar']['baz'] // interpreted as ($$foo)['bar']['baz'] 32 $foo->$bar['baz'] // interpreted as ($foo->$bar)['baz'] 33 $foo->$bar['baz']() // interpreted as ($foo->$bar)['baz']() 34 Foo::$bar['baz']() // interpreted as (Foo::$bar)['baz']() 35 36 To restore the previous behavior add explicit curly braces: 37 38 ${$foo['bar']['baz']} 39 $foo->{$bar['baz']} 40 $foo->{$bar['baz']}() 41 Foo::{$bar['baz']}() 42 43* The global keyword now only accepts simple variables. Instead of 44 45 global $$foo->bar; 46 47 it is now required to write the following: 48 49 global ${$foo->bar}; 50 51* Parentheses around variables or function calls no longer have any influence 52 on behavior. For example the following code, where the result of a function 53 call is passed to a by-reference function 54 55 function getArray() { return [1, 2, 3]; } 56 57 $last = array_pop(getArray()); 58 // Strict Standards: Only variables should be passed by reference 59 $last = array_pop((getArray())); 60 // Strict Standards: Only variables should be passed by reference 61 62 will now throw a strict standards error regardless of whether parentheses 63 are used. Previously no notice was generated in the second case. 64 65* Array elements or object properties that are automatically created during 66 by-reference assignments will now result in a different order. For example 67 68 $array = []; 69 $array["a"] =& $array["b"]; 70 $array["b"] = 1; 71 var_dump($array); 72 73 now results in the array ["a" => 1, "b" => 1], while previously the result 74 was ["b" => 1, "a" => 1]; 75 76Relevant RFCs: 77* https://wiki.php.net/rfc/uniform_variable_syntax 78* https://wiki.php.net/rfc/abstract_syntax_tree 79 80Changes to list() 81----------------- 82 83* list() will no longer assign variables in reverse order. For example 84 85 list($array[], $array[], $array[]) = [1, 2, 3]; 86 var_dump($array); 87 88 will now result in $array == [1, 2, 3] rather than [3, 2, 1]. Note that only 89 the **order** of the assignments changed, but the assigned values stay the 90 same. E.g. a normal usage like 91 92 list($a, $b, $c) = [1, 2, 3]; 93 // $a = 1; $b = 2; $c = 3; 94 95 will retain its current behavior. 96 97* Empty list() assignments are no longer allowed. As such all of the following 98 are invalid: 99 100 list() = $a; 101 list(,,) = $a; 102 list($x, list(), $y) = $a; 103 104* list() no longer supports unpacking strings (while previously this was only 105 supported in some cases). The code 106 107 $string = "xy"; 108 list($x, $y) = $string; 109 110 will now result in $x == null and $y == null (without notices) instead of 111 $x == "x" and $y == "y". Furthermore list() is now always guaranteed to 112 work with objects implementing ArrayAccess, e.g. 113 114 list($a, $b) = (object) new ArrayObject([0, 1]); 115 116 will now result in $a == 0 and $b == 1. Previously both $a and $b were null. 117 118Relevant RFCs: 119* https://wiki.php.net/rfc/abstract_syntax_tree#changes_to_list 120* https://wiki.php.net/rfc/fix_list_behavior_inconsistency 121 122Changes to foreach 123------------------ 124 125* Iteration with foreach() no longer has any effect on the internal array 126 pointer, which can be accessed through the current()/next()/etc family of 127 functions. For example 128 129 $array = [0, 1, 2]; 130 foreach ($array as &$val) { 131 var_dump(current($array)); 132 } 133 134 will now print the value int(0) three times. Previously the output was int(1), 135 int(2) and bool(false). 136 137* When iterating arrays by-value, foreach will now always operate on a copy of 138 the array, as such changes to the array during iteration will not influence 139 iteration behavior. For example 140 141 $array = [0, 1, 2]; 142 $ref =& $array; // Necessary to trigger the old behavior 143 foreach ($array as $val) { 144 var_dump($val); 145 unset($array[1]); 146 } 147 148 will now print all three elements (0 1 2), while previously the second element 149 1 was skipped (0 2). 150 151* When iterating arrays by-reference, modifications to the array will continue 152 to influence the iteration. However PHP will now do a better job of 153 maintaining a correct position in a number of cases. E.g. appending to an 154 array during by-reference iteration 155 156 $array = [0]; 157 foreach ($array as &$val) { 158 var_dump($val); 159 $array[1] = 1; 160 } 161 162 will now iterate over the appended element as well. As such the output of this 163 example will now be "int(0) int(1)", while previously it was only "int(0)". 164 165* Iteration of plain (non-Traversable) objects by-value or by-reference will 166 behave like by-reference iteration of arrays. This matches the previous 167 behavior apart from the more accurate position management mentioned in the 168 previous point. 169 170* Iteration of Traversable objects remains unchanged. 171 172Relevant RFC: https://wiki.php.net/rfc/php7_foreach 173 174Changes to parameter handling 175----------------------------- 176 177* It is no longer possible to define two function parameters with the same name. 178 For example, the following method will trigger a compile-time error: 179 180 public function foo($a, $b, $unused, $unused) { 181 // ... 182 } 183 184 Code like this should be changed to use distinct parameter names, for example: 185 186 public function foo($a, $b, $unused1, $unused2) { 187 // ... 188 } 189 190* The func_get_arg() and func_get_args() functions will no longer return the 191 original value that was passed to a parameter and will instead provide the 192 current value (which might have been modified). For example 193 194 function foo($x) { 195 $x++; 196 var_dump(func_get_arg(0)); 197 } 198 foo(1); 199 200 will now print "2" instead of "1". This code should be changed to either 201 perform modifications only after calling func_get_arg(s) 202 203 function foo($x) { 204 var_dump(func_get_arg(0)); 205 $x++; 206 } 207 208 or avoid modifying the parameters altogether: 209 210 function foo($x) { 211 $newX = $x + 1; 212 var_dump(func_get_arg(0)); 213 } 214 215* Similarly exception backtraces will no longer display the original value that 216 was passed to a function and show the modified value instead. For example 217 218 function foo($x) { 219 $x = 42; 220 throw new Exception; 221 } 222 foo("string"); 223 224 will now result in the stack trace 225 226 Stack trace: 227 #0 file.php(4): foo(42) 228 #1 {main} 229 230 while previously it was: 231 232 Stack trace: 233 #0 file.php(4): foo('string') 234 #1 {main} 235 236 While this should not impact runtime behavior of your code, it is worthwhile 237 to be aware of this difference for debugging purposes. 238 239 The same limitation also applies to debug_backtrace() and other functions 240 inspecting function arguments. 241 242Relevant RFC: https://wiki.php.net/phpng 243 244Changes to integer handling 245--------------------------- 246 247* Invalid octal literals (containing digits larger than 7) now produce compile 248 errors. For example, the following is no longer valid: 249 250 $i = 0781; // 8 is not a valid octal digit! 251 252 Previously the invalid digits (and any following valid digits) were simply 253 ignored. As such $i previously held the value 7, because the last two digits 254 were silently discarded. 255 256* Bitwise shifts by negative numbers will now throw an ArithmeticError: 257 258 var_dump(1 >> -1); 259 // ArithmeticError: Bit shift by negative number 260 261* Left bitwise shifts by a number of bits beyond the bit width of an integer 262 will always result in 0: 263 264 var_dump(1 << 64); // int(0) 265 266 Previously the behavior of this code was dependent on the used CPU 267 architecture. For example on x86 (including x86-64) the result was int(1), 268 because the shift operand was wrapped. 269 270* Similarly right bitwise shifts by a number of bits beyond the bit width of an 271 integer will always result in 0 or -1 (depending on sign): 272 273 var_dump(1 >> 64); // int(0) 274 var_dump(-1 >> 64); // int(-1) 275 276Relevant RFC: https://wiki.php.net/rfc/integer_semantics 277 278Changes to string handling 279-------------------------- 280 281* Strings that contain hexadecimal numbers are no longer considered to be 282 numeric and don't receive special treatment anymore. Some examples of the 283 new behavior: 284 285 var_dump("0x123" == "291"); // bool(false) (previously true) 286 var_dump(is_numeric("0x123")); // bool(false) (previously true) 287 var_dump("0xe" + "0x1"); // int(0) (previously 16) 288 289 var_dump(substr("foo", "0x1")); // string(3) "foo" (previously "oo") 290 // Notice: A non well formed numeric value encountered 291 292 filter_var() can be used to check if a string contains a hexadecimal number 293 or convert such a string into an integer: 294 295 $str = "0xffff"; 296 $int = filter_var($str, FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX); 297 if (false === $int) { 298 throw new Exception("Invalid integer!"); 299 } 300 var_dump($int); // int(65535) 301 302* Due to the addition of the Unicode Codepoint Escape Syntax for double-quoted 303 strings and heredocs, "\u{" followed by an invalid sequence will now result in 304 an error: 305 306 $str = "\u{xyz}"; // Fatal error: Invalid UTF-8 codepoint escape sequence 307 308 To avoid this the leading backslash should be escaped: 309 310 $str = "\\u{xyz}"; // Works fine 311 312 However, "\u" without a following { is unaffected. As such the following code 313 won't error and will work the same as before: 314 315 $str = "\u202e"; // Works fine 316 317Relevant RFCs: 318* https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings 319* https://wiki.php.net/rfc/unicode_escape 320 321Changes to error handling 322------------------------- 323 324* There are now two exception classes: Exception and Error. Both classes 325 implement a new interface Throwable. Type hints in exception handling code 326 may need to be changed to account for this. 327 328* Some fatal errors and recoverable fatal errors now throw an Error instead. 329 As Error is a separate class from Exception, these exceptions will not be 330 caught by existing try/catch blocks. 331 332 For the recoverable fatal errors which have been converted into an exception, 333 it is no longer possible to silently ignore the error from an error handler. 334 In particular, it is no longer possible to ignore type hint failures. 335 336* Parser errors now generate a ParseError that extends Error. Error 337 handling for eval()s on potentially invalid code should be changed to catch 338 ParseError in addition to the previous return value / error_get_last() 339 based handling. 340 341* Constructors of internal classes will now always throw an exception on 342 failure. Previously some constructors returned NULL or an unusable object. 343 344* The error level of some E_STRICT notices has been changed. 345 346Relevant RFCs: 347* https://wiki.php.net/rfc/engine_exceptions_for_php7 348* https://wiki.php.net/rfc/throwable-interface 349* https://wiki.php.net/rfc/internal_constructor_behaviour 350* https://wiki.php.net/rfc/reclassify_e_strict 351 352Other language changes 353---------------------- 354 355* Removed support for static calls to non-static methods from an incompatible 356 $this context. In this case $this will not be defined, but the call will be 357 allowed with a deprecation notice. An example: 358 359 class A { 360 public function test() { var_dump($this); } 361 } 362 363 // Note: Does NOT extend A 364 class B { 365 public function callNonStaticMethodOfA() { A::test(); } 366 } 367 368 (new B)->callNonStaticMethodOfA(); 369 370 // Deprecated: Non-static method A::test() should not be called statically 371 // Notice: Undefined variable $this 372 NULL 373 374 Note that this only applies to calls from an incompatible context. If class B 375 extended from A the call would be allowed without any notices. 376 377* It is no longer possible to use the following class, interface and trait names 378 (case-insensitive): 379 380 bool 381 int 382 float 383 string 384 null 385 false 386 true 387 388 This applies to class/interface/trait declarations, class_alias() and use 389 statements. 390 391 Furthermore the following class, interface and trait names are now reserved 392 for future use, but do not yet throw an error when used: 393 394 resource 395 object 396 mixed 397 numeric 398 399* The yield language construct no longer requires parentheses when used in an 400 expression context. It is now a right-associative operator with precedence 401 between the "print" and "=>" operators. This can result in different behavior 402 in some cases, for example: 403 404 echo yield -1; 405 // Was previously interpreted as 406 echo (yield) - 1; 407 // And is now interpreted as 408 echo yield (-1); 409 410 yield $foo or die; 411 // Was previously interpreted as 412 yield ($foo or die); 413 // And is now interpreted as 414 (yield $foo) or die; 415 416 Such cases can always be resolved by adding additional parentheses. 417 418 . Removed ASP (<%) and script (<script language=php>) tags. 419 (RFC: https://wiki.php.net/rfc/remove_alternative_php_tags) 420 . Removed support for assigning the result of new by reference. 421 . Removed support for scoped calls to non-static methods from an incompatible 422 $this context. See details in https://wiki.php.net/rfc/incompat_ctx. 423 . Removed support for #-style comments in ini files. Use ;-style comments 424 instead. 425 . $HTTP_RAW_POST_DATA is no longer available. Use the php://input stream instead. 426 427Standard library changes 428======================== 429 430 . substr() now returns an empty string instead of FALSE when the truncation happens on boundaries. 431 . call_user_method() and call_user_method_array() no longer exists. 432 . ob_start() no longer issues an E_ERROR, but instead an E_RECOVERABLE_ERROR in case an 433 output buffer is created in an output buffer handler. 434 . The internal sorting algorithm has been improved, what may result in 435 different sort order of elements that compare as equal. 436 . Removed dl() function on fpm-fcgi. 437 . setcookie() with an empty cookie name now issues a WARNING and doesn't send an empty set-cookie header line anymore. 438 439Other 440===== 441 442- Curl: 443 . Removed support for disabling the CURLOPT_SAFE_UPLOAD option. All curl file 444 uploads must use the curl_file / CURLFile APIs. 445 . curl_getinfo($ch, CURLINFO_CERTINFO) returns certificate Subject and Issuer 446 as a string (PHP >= 5.6.25) 447 448- Date: 449 . Removed $is_dst parameter from mktime() and gmmktime(). 450 451- DBA 452 . dba_delete() now returns false if the key was not found for the inifile 453 handler, too. 454 455- GMP 456 . Requires libgmp version 4.2 or newer now. 457 . gmp_setbit() and gmp_clrbit() now return FALSE for negative indices, making 458 them consistent with other GMP functions. 459 460- Intl: 461 . Removed deprecated aliases datefmt_set_timezone_id() and 462 IntlDateFormatter::setTimeZoneID(). Use datefmt_set_timezone() and 463 IntlDateFormatter::setTimeZone() instead. 464 465- libxml: 466 . Added LIBXML_BIGLINES parser option. It's available starting with libxml 2.9.0 467 and adds suppport for line numbers >16-bit in the error reporting. 468 469- Mcrypt 470 . Removed deprecated mcrypt_generic_end() alias in favor of 471 mcrypt_generic_deinit(). 472 . Removed deprecated mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() 473 functions in favor of mcrypt_encrypt() and mcrypt_decrypt() with an 474 MCRYPT_MODE_* flag. 475 476- Session 477 . session_start() accepts all INI settings as array. e.g. ['cache_limiter'=>'private'] 478 sets session.cache_limiter=private. It also supports 'read_and_close' which closes 479 session data immediately after read data. 480 . Save handler accepts validate_sid(), update_timestamp() which validates session 481 ID existence, updates timestamp of session data. Compatibility of old user defined 482 save handler is retained. 483 . SessionUpdateTimestampHandlerInterface is added. validateSid(), updateTimestamp() 484 is defined in the interface. 485 . session.lazy_write(default=On) INI setting enables only write session data when 486 session data is updated. 487 . session_regenerate_id() saves current $_SESSION before creating new session ID. 488 489- Opcache 490 . Removed opcache.load_comments configuration directive. Now doc comments 491 loading costs nothing and always enabled. 492 493- OpenSSL: 494 . Removed the "rsa_key_size" SSL context option in favor of automatically 495 setting the appropriate size given the negotiated crypto algorithm. 496 . Removed "CN_match" and "SNI_server_name" SSL context options. Use automatic 497 detection or the "peer_name" option instead. 498 499- PCRE: 500 . Removed support for /e (PREG_REPLACE_EVAL) modifier. Use 501 preg_replace_callback() instead. 502 503- PDO_pgsql: 504 . Removed PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT attribute in favor of 505 ATTR_EMULATE_PREPARES. 506 507- Standard: 508 . Removed string category support in setlocale(). Use the LC_* constants 509 instead. 510 . Removed set_magic_quotes_runtime() and its alias magic_quotes_runtime(). 511 512- JSON: 513 . Rejected RFC 7159 incompatible number formats in json_decode string - 514 top level (07, 0xff, .1, -.1) and all levels ([1.], [1.e1]) 515 . Calling json_decode with 1st argument equal to empty PHP string or value that 516 after casting to string is empty string (NULL, FALSE) results in JSON syntax error. 517 518- Stream: 519 . Removed set_socket_blocking() in favor of its alias stream_set_blocking(). 520 521- XML: 522 . xml_set_object() now requires to manually unset the $parser when finished, 523 to avoid memory leaks. 524 525- XSL: 526 . Removed xsl.security_prefs ini option. Use XsltProcessor::setSecurityPrefs() 527 instead. 528 529- IMAP: 530 Starting with 7.0.33, rsh/ssh logins are disabled by default. Use 531 imap.enable_insecure_rsh if you want to enable them. Note that the IMAP 532 library does not filter mailbox names before passing them to rsh/ssh 533 command, thus passing untrusted data to this function with rsh/ssh enabled 534 is insecure. 535 536======================================== 5372. New Features 538======================================== 539 540- Core 541 . Added group use declarations. 542 (RFC: https://wiki.php.net/rfc/group_use_declarations) 543 . Added null coalesce operator (??). 544 (RFC: https://wiki.php.net/rfc/isset_ternary) 545 . Support for strings with length >= 2^31 bytes in 64 bit builds. 546 . Closure::call() method added (works only with userland classes). 547 . Added \u{xxxxxx} Unicode Codepoint Escape Syntax for double-quoted strings 548 and heredocs. 549 . define() now supports arrays as constant values, fixing an oversight where 550 define() did not support arrays yet const syntax did. 551 . Added the comparison operator (<=>), aka the spaceship operator. 552 (RFC: https://wiki.php.net/rfc/combined-comparison-operator) 553 . Added the yield from operator for delegating Generators like coroutines. 554 (RFC: https://wiki.php.net/rfc/generator-delegation) 555 . Reserved keywords can now be used in various new contexts. 556 (RFC: https://wiki.php.net/rfc/context_sensitive_lexer) 557 . Added support for scalar type declarations and strict mode using 558 declare(strict_types=1) (RFC: https://wiki.php.net/rfc/scalar_type_hints_v5) 559 . Added support for cryptographically secure user land RNG 560 (RFC: https://wiki.php.net/rfc/easy_userland_csprng) 561 562- Opcache 563 . Added second level file based opcode cache. It may be enabled by setting 564 opcache.file_cache=<DIR> configuration directive in php.ini. The second 565 level cache may improve performance when SHM is full, at server restart or 566 SHM reset. In addition, it's possibe to use file cache without SHM at all, 567 using opcache.file_cache_only=1 (this may be useful for sharing hosting), 568 and disable file cache consistency check, to speedup loading at the cost of 569 safety, using opcache.file_cache_consistency_checks=0. 570 . Added ability to move PHP code pages (PHP TEXT segment) into HUGE pages. 571 It's possible to enable/disable this feature in php.ini through 572 opcache.huge_code_pages=0/1. OS should be configured to provide huge pages. 573 . Added Windows only opcache.file_cache_fallback=1 ini option, which implies 574 the implemented fallback mechanism. When OPcache was not able to reattach 575 the shared memory segment to the desired address and opcache.file_cache 576 is on, opcache.file_cache_only=1 will be automatically enforced. 577 578- OpenSSL 579 . Added "alpn_protocols" SSL context option allowing encrypted client/server 580 streams to negotiate alternative protocols using the ALPN TLS extension when 581 built against OpenSSL 1.0.2 or newer. Negotiated protocol information is 582 accessible through stream_get_meta_data() output. 583 584- Reflection 585 . Added a ReflectionGenerator class (yield from Traces, current file/line, 586 etc.) 587 . Added a ReflectionType class to better support the new return type and 588 scalar type declarations features. The new ReflectionParameter::getType() 589 and ReflectionFunctionAbstract::getReturnType() methods both return an 590 instance of ReflectionType. 591 592- Stream: 593 . New Windows only stream context options was added to allow blocking reads 594 on pipes. To enable it, pass array("pipe" => array("blocking" => true)) 595 when creating the stream context. Be aware, that this option can under 596 circumstances cause dead locks on the pipe buffer. However it can be useful 597 in several CLI use case scenarios. 598 599======================================== 6003. Changes in SAPI modules 601======================================== 602 603- FPM 604 . Fixed bug #65933 (Cannot specify config lines longer than 1024 bytes). 605 . Listen = port now listen on all addresses (IPv6 and IPv4-mapped). 606 607======================================== 6084. Deprecated Functionality 609======================================== 610 611- Core 612 . PHP 4 style constructors, where the constructor name is the same as the 613 class name, are now deprecated. 614 . Static calls to non-static methods are now deprecated. 615 616- OpenSSL 617 . The "capture_session_meta" SSL context option is now deprecated. Meta 618 data concerning active crypto on a stream resource is now accessible 619 through the return result from stream_get_meta_data(). 620 621======================================== 6225. Changed Functions 623======================================== 624 625- unserialize(): 626 . Added second parameter for unserialize function 627 (RFC: https://wiki.php.net/rfc/secure_unserialize) allowing to specify 628 acceptable classes: 629 unserialize($foo, ["allowed_classes" => ["MyClass", "MyClass2"]]); 630 631- proc_open(): 632 . The maximum number of pipes used by proc_open() was previously limited by 633 hardcoded value of 16. This limit is now removed and the number of pipes is 634 effectively limited by the amount of memory available to PHP. 635 . New Windows only configuration option "blocking_pipes" can be used to 636 force blocking reads on child process pipes. This covers several 637 edge cases in CLI usage however can lead to dead locks. Also, this 638 correlates with the new stream context options for pipes. 639 640- array_column(): 641 The function now supports an array of objects as well as two-dimensional 642 arrays. Only public properties are considered, and objects that make use of 643 __get() for dynamic properties must also implement __isset(). 644 645- stream_context_create() 646 It accepts now a Windows only configuration 647 array("pipe" => array("blocking" => <boolean>)) which forces blocking reads 648 on pipes. This option should be used carefully because due to the 649 platform restrictions dead locks on pipe buffers are possible. 650 651- dirname() 652 A new optional argument ($levels) allow to go up various times 653 dirname(dirname($foo)) => dirname($foo, 2); 654 655- debug_zval_dump 656 It prints now "int" instead of "long", and "float" instead of "double". 657 658- getenv() 659 Since 7.0.9, getenv() has optional second parameter, making it only 660 consider local environment and not SAPI environment if true. 661 662- fopen() 663 Since 7.0.16, mode 'e' was added, which sets the close-on-exec flag 664 on the opened file descriptor. This mode is only available in PHP compiled on 665 POSIX.1-2008 conform systems. 666 667======================================== 6686. New Functions 669======================================== 670 671- GMP 672 . Added gmp_random_seed(). 673 674- PCRE: 675 . Added preg_replace_callback_array function 676 (RFC: https://wiki.php.net/rfc/preg_replace_callback_array) 677 678- Standard 679 . Added intdiv() function for integer division. 680 . Added error_clear_last() function to reset error state. 681 682- Zip: 683 . Added ZipArchive::setCompressionIndex() and ZipArchive::setCompressionName() 684 for setting the compression method. 685 686- Zlib: 687 . Added deflate_init(), deflate_add(), inflate_init(), inflate_add() 688 functions allowing incremental/streaming compression/decompression. 689 690======================================== 6917. New Classes and Interfaces 692======================================== 693 694- ReflectionGenerator 695- ReflectionType 696 697======================================== 6988. Removed Extensions and SAPIs 699======================================== 700 701- sapi/aolserver 702- sapi/apache 703- sapi/apache_hooks 704- sapi/apache2filter 705- sapi/caudium 706- sapi/continuity 707- sapi/isapi 708- sapi/milter 709- sapi/nsapi 710- sapi/phttpd 711- sapi/pi3web 712- sapi/roxen 713- sapi/thttpd 714- sapi/tux 715- sapi/webjames 716- ext/mssql 717- ext/mysql 718- ext/sybase_ct 719- ext/ereg 720 721For more details see 722 723https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts 724https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7 725 726NOTE: NSAPI was not voted in the RFC, however it was removed afterwards. It turned 727out, that the corresponding SDK isn't available anymore. 728 729======================================== 7309. Other Changes to Extensions 731======================================== 732 733- Mhash 734 Mhash is not an extension anymore, use function_exists("mhash") to check whether 735 it is avaliable. 736 737- PDO_Firebird 738 As of PHP 7.0.16, the fetched data for integer fields is aware of the Firebird 739 datatypes. Previously all integers was fetched as strings, starting with the 740 aforementioned PHP version integer fields are translated to the PHP integer 741 datatype. The 64-bit integers are still fetched as strings in 32-bit PHP 742 builds. 743 744- GD 745 The bundled libgd requires libwebp instead of libvpx for the WebP functionality. 746 747- Openssl 748 minimum supported OpenSSL version series was raised to 0.9.8 749 750- Shmop 751 The shmop identifiers have been changed from ints to resources of type shmop. 752 753======================================== 75410. New Global Constants 755======================================== 756 757- Core 758 . PHP_INT_MIN added. 759 760- PCRE 761 . This error constant is added to signal errors due to stack size limitations 762 when PCRE JIT support is enabled: 763 . PREG_JIT_STACKLIMIT_ERROR 764 765- Zlib 766 . These constants are added to control flush behavior with the new 767 incremental deflate_add() and inflate_add() functions: 768 . ZLIB_NO_FLUSH 769 . ZLIB_PARTIAL_FLUSH 770 . ZLIB_SYNC_FLUSH 771 . ZLIB_FULL_FLUSH 772 . ZLIB_BLOCK 773 . ZLIB_FINISH 774 775- GD 776 . IMG_WEBP (>= 7.0.10) 777 778 . T1Lib support removed, thus lifting the optional dependency on T1Lib, the 779 following is therefore not available anymore: 780 781 Functions: 782 - imagepsbbox() 783 - imagepsencodefont() 784 - imagepsextendedfont() 785 - imagepsfreefont() 786 - imagepsloadfont() 787 - imagepsslantfont() 788 - imagepstext() 789 790 Resources: 791 - 'gd PS font' 792 - 'gd PS encoding' 793 794- Zip 795 . Filename encoding flags, as of 7.0.8 796 - ZipArchive::FL_ENC_GUESS 797 - ZipArchive::FL_ENC_RAW 798 - ZipArchive::FL_ENC_STRICT 799 - ZipArchive::FL_ENC_UTF_8 800 - ZipArchive::FL_ENC_CP437 801 802======================================== 80311. Changes to INI File Handling 804======================================== 805 806- Core 807 . Removed asp_tags ini directive. Trying to enable it will result in a fatal 808 error. 809 . Removed always_populate_raw_post_data ini directive. 810 . realpath_cache_size set to 4096k by default 811 812======================================== 81312. Windows Support 814======================================== 815 816- Core 817 . Support for native 64 bit integers in 64 bit builds. 818 . Support for large files in 64 bit builds. 819 . Support for getrusage() 820 821- ftp 822 . The ftp extension is always shipped shared 823 . For SSL support, the dependency on the openssl extension was abolished. Instead 824 it depends alone on the openssl library. If it's present at the compile time, 825 ftp_ssl_connect() is enabled automatically. 826 827- imap 828 . Static building of ext/imap is disabled 829 830- odbc 831 . The odbc extension is always shipped shared 832 833======================================== 83413. Other Changes 835======================================== 836 837- Core 838 . Instead of being undefined and platform-dependent, NaN and Infinity will 839 always be zero when cast to integer. 840 . Calling a method on a non-object now raises a catchable error instead of a 841 fatal error; see: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object 842 . Error messages for zend_parse_parameters, type hints and conversions now 843 always say "integer" and "float" instead of "long" and "double". 844 . Output buffering now continues to work for an aborted connection if 845 ignore_user_abort is set to true. 846 . Zend Extensions API was extended with zend_extension.op_array_persist_calc() 847 and zend_extensions.op_array_persist() handlers. They allow to store (or 848 reset) associated with op_array addition information in Opcache Shared 849 Memory. 850 . zend_internal_function.reserved[] array was introduced to allow association 851 of aditional information with internal functions. In PHP-5 it was possible 852 to use zend_function.op_array.reserved[] even for internal functions, but 853 now we don't allocate extra space. 854 855- CURL 856 . curl_getinfo($ch, CURLINFO_CERTINFO) returns certificate Subject and Issuer 857 as a string (PHP >= 7.0.10) 858