|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-03-12 13:44 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2010-03-12 13:44 UTC] johannes@php.net
[2010-03-12 13:46 UTC] easteregg at verfriemelt dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 14:00:01 2025 UTC |
Description: ------------ if i concat some strings like $string .= ' ' . (true)? asd : foo ; the whitespace is always missing.. see code snipped! Test script: --------------- <?php class test { public $data = array(); public function __construct() { $this->data["sort"] = "erstellt"; $this->data["order"] = "1"; $order = null; if (isset($this->data["sort"])) { $order = $this->data["sort"]; if (isset($this->data["order"])) $order .= ' ' . ($this->data["order"] == 1) ? "desc" : "asc"; } echo $order; //returns erstelltdesc echo "\n------------------------------\n"; $order = null; if (isset($this->data["sort"])) { $order = $this->data["sort"]; if (isset($this->data["order"])) { $order .= ' '; $order .= ($this->data["order"] == 1) ? "desc" : "asc"; } } echo $order; //returns erstellt desc } } new test() ?> Expected result: ---------------- erstellt desc ------------------------------ erstellt desc Actual result: -------------- erstelltdesc ------------------------------ erstellt desc