[lang-ref] ( get_key_value_pair ) ( php )

<?php
public function testGetKeyValuePairAlternative(): void
{
	$d = [ 'A' => 1, 'B' => 2, 'C' => 3 ];

	$items = [];
	foreach ($d as $k => $v) {
		$items[] = [$k, $v];
	}

	$this->assertSame([ ['A', 1], ['B', 2], ['C', 3] ], $items);
}