<?php
enum ArrayKeys { case IncludeAll; }
$array = [
'empty' => '',
'enum' => ArrayKeys::IncludeAll,
'zero' => 0,
'one' => 1,
'null' => null,
'false' => false,
'true' => true,
];
var_export(array_keys($array, ArrayKeys::IncludeAll));
- Output for 8.1.0 - 8.1.20, 8.2.0 - 8.2.7
- array (
0 => 'enum',
)
- Output for 8.0.1 - 8.0.29
- Parse error: syntax error, unexpected identifier "ArrayKeys" in /in/5Br1a on line 3
Process exited with code 255.
preferences:
192.75 ms | 1399 KiB | 64 Q