Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
#php
You can easily set up a WordPress development environment using GitHub Codespaces or locally with Docker. Codespaces lets you start coding in a ready-made cloud environment directly from your browser, saving setup time and letting you work anywhere. For local setup, you need Node.js, npm, and Docker installed. After cloning the WordPress development repository, you run simple commands to install dependencies, build the project, and start the environment. You can access your WordPress site at http8889, run tests, and manage the environment with commands. This setup helps you develop, test, and contribute to WordPress efficiently without complex manual configuration.
https://github.com/WordPress/wordpress-develop
¿Que puede hacer este bot?
@phpiobot
Este bot fue creado para ayudar a los programadores a encontrar documentación de funciones en PHP vía inline
Idioma: inglés
(Visto en @botsgram_cu)
#php