|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-03-09 14:34 UTC] nikic@php.net
-Assigned To:
+Assigned To: nikic
[2020-03-09 14:34 UTC] nikic@php.net
[2020-03-09 15:21 UTC] nikic@php.net
[2020-03-10 10:29 UTC] bugreports at gmail dot com
[2020-03-10 10:44 UTC] nikic@php.net
[2022-12-22 09:43 UTC] melindaetinw81 at gmail dot com
[2023-04-25 10:36 UTC] heemadash93 at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 20:00:01 2025 UTC |
Description: ------------ with opcache other than "Null coalescing operator" the "Null Coalescing Assignment" is not completly optimized out function a() { $test = $test ?? TRUE; return $test; } function b() { $test ??= TRUE; return $test; } runtime difference with 50000000 calls: a(): 3.1884 b(): 3.3666 function name: a number of ops: 2 ---------------------------------------------------------------------------------- 5 0* COALESCE ~1 !0 6 1* RETURN <true> function name: b number of ops: 3 ---------------------------------------------------------------------------------- 11 0* COALESCE ~1 !0 1* ASSIGN $2 !0, <true> 12 2* RETURN !0