Wie kann ich in PHP den ternären Operator zusammen mit »Zuweisung per Referenz« verwenden?

Dies scheint zur Zeit nicht möglich sein.
Folgendes funktioniert nicht:

  $currentCat = & ($config["cat_localroot"] == $config["cat"] ? 
    $localRootCat : 
    $localRootCat->descendantTag($config["cat"]));

Folgendes funktioniert ebenfalls nicht:

  $currentCat = $config["cat_localroot"] == $config["cat"] ? 
    (& $localRootCat) : 
    (& $localRootCat->descendantTag($config["cat"]));

Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.