Closed
Description
Description
Currently, http_build_query
converts BackedEnums into an object, which is not very useful.
I would like the result to be aligned with json_encode
which returns the backed value.
<?php
enum Status: int
{
case Active = 1;
}
$status = Status::Active;
echo http_build_query($status) . PHP_EOL; // "name=Active&value=1"
echo json_encode($status) . PHP_EOL; // "1"