xref: /PHP-8.0/ext/standard/tests/array/compact.phpt (revision c37a1cd6)
1--TEST--
2compact()
3--FILE--
4<?php
5
6$çity  = "San Francisco";
7$state = "CA";
8$event = "SIGGRAPH";
9
10$location_vars = array("c\\u0327ity", "state");
11
12$result = compact("event", $location_vars);
13var_dump($result);
14?>
15--EXPECTF--
16Warning: compact(): Undefined variable $c\u0327ity in %s on line %d
17array(2) {
18  ["event"]=>
19  string(8) "SIGGRAPH"
20  ["state"]=>
21  string(2) "CA"
22}
23