com php-src: add extra test to protected behavior of compact and array string key order: ext/standard/tests/array/compact_order.ph pt

From: Date: Thu, 01 Sep 2016 11:01:42 +0000
Subject: com php-src: add extra test to protected behavior of compact and array string key order: ext/standard/tests/array/compact_order.ph pt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94228@lists.php.net to get a copy of this message
Commit: cba560e67fbd44abf6648dd01ec0f231123993cd Author: Márcio Almada <marcio3w@gmail.com> Thu, 1 Sep 2016 03:52:54 -0400 Committer: Nikita Popov <nikic@php.net> Thu, 1 Sep 2016 13:01:42 +0200 Parents: 00c2c3a4761e7e4f9d4c4721da684c051588dfc2 Branches: PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cba560e67fbd44abf6648dd01ec0f231123993cd Log: add extra test to protected behavior of compact and array string key order Changed paths: A ext/standard/tests/array/compact_order.phpt Diff: diff --git a/ext/standard/tests/array/compact_order.phpt b/ext/standard/tests/array/compact_order.phpt new file mode 100644 index 0000000..bf6051c --- /dev/null +++ b/ext/standard/tests/array/compact_order.phpt @@ -0,0 +1,25 @@ +--TEST-- +compact() and hashmap order +--FILE-- +<?php + +$foo = null; +$bar = null; + +var_dump(compact('foo', 'bar')); +var_dump(compact('bar', 'foo')); + +?> +--EXPECT-- +array(2) { + ["foo"]=> + NULL + ["bar"]=> + NULL +} +array(2) { + ["bar"]=> + NULL + ["foo"]=> + NULL +}

« previous php.cvs (#94228) next »