PHP variable / function / class names using special characters

后端 未结 5 1527
忘了有多久
忘了有多久 2021-02-12 22:40

I understand that the underscore _ is an acceptable character for naming variables / functions / classes etc. However I was wondering if there are any other special

5条回答
  •  爱一瞬间的悲伤
    2021-02-12 23:19

    If you want to structure names by combining elements (for example functions, and database column or tables names), you could use a double underscore as a separator:

    social_security_number__check(),
    musical_instrument__tune(),
    vehicle__insert()
    

    or

    check__social_security_number(),
    tune__musical_instrument(),
    insert__vehicle()
    

提交回复
热议问题