Use the constant() function:
$id = constant("ThingIDs::$thing");
More Related Contents:
- Can I get CONST’s defined on a PHP class?
- How to make array inside in foreach loop – php? [closed]
- Please rectify this syntax error echo ” ” Add to cart “”; [closed]
- Can anyone help me what is wrong in this code ajax using with php? [closed]
- PHP – Failed to open stream : No such file or directory
- MySQL vs MySQLi when using PHP [closed]
- Sort array of objects by object fields
- Get the first element of an array
- PHP Elvis operator vs null coalescing operator
- How can I store and retrieve images from a MySQL database using PHP?
- PHP preg_match to find multiple occurrences
- Convert command line cURL to PHP cURL
- Facebook API – How do I get a Facebook user’s profile image through the Facebook API (without requiring the user to “Allow” the application)
- mysqli_stmt::bind_param(): Number of elements in type definition string doesn’t match number of bind variables
- How to access dynamic variable names in twig?
- How can I truncate a string to the first 20 words in PHP?
- How can I run a PHP script inside a HTML file?
- IP Address of the machine in PHP gives ::1 but why?
- Casting an Array with Numeric Keys as an Object
- how to write javascript code inside php
- Store procedures in phpMyAdmin
- Which tokens can be parameterized in PDO prepared statements?
- What are the differences between composer update and composer install?
- Using PHP/Apache to restrict access to static files (html, css, img, etc)
- How can I detect a malformed UTF-8 string in PHP?
- How can I run a php without a web server?
- How to Merge Two Eloquent Collections?
- Add a line break in Woocommerce Product Titles
- cURL error 60: SSL certificate prblm: unable to get local issuer certificate [duplicate]
- PHP “&” operator