PHP 8.2.20 Released!

Voting

: max(five, one)?
(Example: nine)

The Note You're Voting On

Trevor Blackbird > yurab.com
18 years ago
Technically you can define constants with names that are not valid for variables:

<?php

// $3some is not a valid variable name
// This will not work
$3some = 'invalid';

// This works
define('3some', 'valid');
echo
constant('3some');

?>

Of course this is not a good practice, but PHP has got you covered.

<< Back to user notes page

To Top