|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-20 10:13 UTC] colder@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 14:00:01 2025 UTC |
Description: ------------ The Ternary-Operator shortcut doesn't do the same with empty() Reproduce code: --------------- ini_set('display_errors', true); error_reporting(E_ALL|E_STRICT); $var = 'Something'; echo !empty($var) ? $var : 'Nothing'; echo !empty($var) ?: 'Nothing'; Expected result: ---------------- SomethingSomething Actual result: -------------- Something1