3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $hits = array( 'sortby' => array( 'String 1', 'String 11', 'String 2' ), 'html' => array( '<div>This element contains String 1</div>', '<div>This element contains String 11</div>', '<div>This element contains String 2</div>', ) ); foreach($hits as $sh => $v){ echo $sh; } var_dump($hits);
based on AWn1R
Output for 4.3.0 - 7.2.0
sortbyhtmlarray(2) { ["sortby"]=> array(3) { [0]=> string(8) "String 1" [1]=> string(9) "String 11" [2]=> string(8) "String 2" } ["html"]=> array(3) { [0]=> string(41) "<div>This element contains String 1</div>" [1]=> string(42) "<div>This element contains String 11</div>" [2]=> string(41) "<div>This element contains String 2</div>" } }