Ask experts to answer questions about weak php Data Types and smart prompts of IDE

Source: Internet
Author: User
Everyone knows that php only has one $ a when declaring a variable, so IDE does not know what its data type is. If it is a class instance, $ anewClass (); then the IDE will know that it is a class instance and prompt the class attributes and methods when you write code. However, when

Everyone knows that php only has one $ a when declaring a variable, so IDE does not know what its data type is. If it is a class instance, $ a = new Class (); then the IDE will know that it is a Class instance, and you will be able to prompt the Class attributes and methods when writing code. However, when

We all know that php isDataTypeSo when declaring a variable, there is only one $ a, so IDE does not know itsDataTypeWhat is

If he is an instance of a Class, $ a = new Class (); then the IDE will know that he is an instance of a Class, so that when you write code,PromptClass attributes and methods.

However, when your instance $ a is returned by a function, such as the Factory mode or Singleton mode, your $ a = Factory:: getClass ();

At this time, IDE does not know him, and does not provide attributes and methods.Prompt. This affects the encoding speed.

Is there any as syntax like C #?Prompt. Or is there any good solution?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.