3v4l.org

run code in 200+ PHP versions simultaneously
<?php $ar = [ 'must' => [ [ 'match' => [ 'testField' => 'abc' ] ], [ 'match' => [ 'testField2' => 'xyz' ] ], ] ]; var_dump($ar);
Output for 7.1.25 - 7.3.1
array(1) { ["must"]=> array(2) { [0]=> array(1) { ["match"]=> array(1) { ["testField"]=> string(3) "abc" } } [1]=> array(1) { ["match"]=> array(1) { ["testField2"]=> string(3) "xyz" } } } }