• 0

Dreamweaver lying about a syntax error


Question

Hi all,

I just wondered if someone knows how to disable a specific syntax error from appearing in Dreamweaver CS5.5, or otherwise how to 'upgrade' Dreamweaver's PHP syntax checker. My problem is:

  Quote
http://php.net/manua....comparison.php

The expression (expr1) ? (expr2) : (expr3) evaluates to expr2 if expr1 evaluates to TRUE, and expr3 if expr1 evaluates to FALSE.

Since PHP 5.3, it is possible to leave out the middle part of the ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.

post-176093-0-08206400-1325605014_thumb.

Running Help > Update shows that DW is up-to-date.

Thanks for any help :)

19 answers to this question

Recommended Posts

  • 0

Not too sure what you mean when you say 'cast to boolean', but thanks for the 2nd tip. Changed lines 16 & 17:

$admin = ($_SESSION['status'] == 3 ? true : false);
$loggedin = (count($_SESSION) ? true : false);

$admin = ($_SESSION['status'] == 3);
$loggedin = (count($_SESSION));

Never thought of doing that before, so cheers! :)

  • 0
  On 03/01/2012 at 15:56, AnthonySterling said:

You're using PHP 5.3 specific code, does Dreamweaver (or your version of) support this?

Evidently not, hence why I need to upgrade it to :p

Edit: Sorry, I should've said which version of Dreamweaver I'm using in the OP, but it's CS5.5. Edited to reflect.

  • 0

I think you'll have to use the dynamic code hinting feature in dreamweaver to get it to attempt to support 5.3 but to be honest when i started with PHP i soon wrote off Dreamweaver as an IDE and php support is very limited. I personally use Netbeans now, it is free and has much better support for PHP and has a tonne of features.

  • 0

To be honest with you, I used to whole-heartedly agree about DW being a horrible IDE for writing PHP, but it seems to have come a long way since the Adobe buyout, and I'm actually very impressed with CS5.5

Code hinting however is not the solution... all code hinting is, is this:

post-176093-0-04326700-1325607224.png

Edit: Actually it looks like CS5.5 adds support for PHP 5.3 for code hinting at least, so I don't know why not for syntax checking: click. Putting expr2 in the middle of the ternary makes the syntax error go away, but I don't wanna have to write "old-code".

  • 0

@giantpotato, I see what you're trying to say, but the boolean is expr1, thus my code of:

$uid = ($_SESSION['uid'] ?: false);

is correct.

@Anthony, I just took a look at the new features of PHP 5.3, and tried out Nowdoc - it validates syntactically correct:

$str = <<<'EOD'
Example of string
spanning multiple lines
using nowdoc syntax.
EOD;

Seems like it's a DW bug :(

  • 0

Just noticed jump label support was added into PHP 5.3 ( :|), and that also validates correctly:

goto a;

Also just tried a namespace, and that validates correctly too:

namespace foo;
  class Cat { 
    static function says() {echo 'meoow';}  }

So I guess it must be a bug!

  • 0

Both come back as invalid... with and without trailing semicolon.

Also, seems like Bugbase is only for AIR & Flash bugs, so reporting here instead.

Edit: Reported! Guess there's nothing more I can do, so I'll just have to put up with a ton of red markers all over my code :p

This topic is now closed to further replies.
  • Posts

    • The Start menu in Windows 11 is the Start menu I dislike the most.
    • Apple's AI models still trail behind OpenAI's GPT-4o despite latest update by Pradeep Viswanathan At WWDC 2025, Apple announced several updates related to Apple Intelligence for both developers and consumers. With the new Foundation Models framework, developers can now bring AI experiences to their apps that work offline in a privacy-preserving way and are available free of charge. The Foundation Models framework is built on Apple’s own in-house-developed AI models. Apple also unveiled a new generation of language foundation models. According to Apple, these updated models are faster, more efficient, and offer improved tool use, better reasoning capabilities, multimodal support for image and text inputs, and support for 15 languages. Apple Intelligence includes two foundation models: A 3-billion-parameter model that runs on-device using Apple Silicon. A server-based mixture-of-experts model optimized for Private Cloud Compute. Apple noted that the on-device 3B language model is not designed to be a general-purpose chatbot. Instead, it is intended to perform text-related tasks such as summarization, entity extraction, text understanding, refinement, short dialogues, and creative content generation, among others. The big question is how well Apple’s models perform compared to other leading models on the market. Rather than using standard AI benchmarks, Apple shared results from its own internal evaluations of fundamental language and reasoning capabilities. According to Apple’s text-based evaluations, its on-device 3B model performs favorably against the slightly larger Qwen-2.5-3B and competitively against the larger Qwen-3-4B and Gemma-3-4B in English. Its server-based model performs slightly better than Llama-4-Scout but falls short compared to Qwen-3-235B and OpenAI’s proprietary GPT-4o. In evaluations involving image input, Apple’s on-device model outperforms InternVL and Qwen, and performs competitively against Gemma. While Apple’s server model beats Qwen-2.5-VL, it underperforms when compared to Llama-4-Scout and GPT-4o. These results highlight how far Apple still has to go in foundational AI capabilities. It seems Apple compared its models to GPT-4o to make its performance appear relatively decent. If Apple were to compare its results against OpenAI’s latest O-series models or Google’s Gemini 2.5 Pro, the gap would likely appear much wider. It will be interesting to see how Apple navigates the AI era with its in-house capabilities in the years ahead.
    • Voe 3 video generation has gone viral. Especially with audio they look realistic. People posting tons of wild videos created by ai is insane
    • Vive tool again. Sigh, no thanks.
  • Recent Achievements

    • Week One Done
      IAMFLUXX earned a badge
      Week One Done
    • One Month Later
      Æhund earned a badge
      One Month Later
    • One Month Later
      CoolRaoul earned a badge
      One Month Later
    • First Post
      Kurotama earned a badge
      First Post
    • Collaborator
      Carltonbar earned a badge
      Collaborator
  • Popular Contributors

    1. 1
      +primortal
      492
    2. 2
      ATLien_0
      268
    3. 3
      +FloatingFatMan
      230
    4. 4
      +Edouard
      199
    5. 5
      snowy owl
      152
  • Tell a friend

    Love Neowin? Tell a friend!