3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $attractionsArray = array( "Services" => array( "Travel & Hotels ~72", "Automotive~119", "Professional Services~71", "Home Services~70", "IT Services & Computer Repair~83", "Health and Medical~69" ), "Restaurants" => array( "American / Eclectic~2", "Cafe~11", "Desserts & Bakery~111" ), "Shopping" => array( "Office Equipment~103", "Department Stores~91", "Cosmetics & Beauty Supply~90", "Musical Instruments & Teachers~102", "Food~87" ), "Entertainment" => array( "Bars/Pubs~48" ) "Travel" => array( "Hotels~129" ) ); foreach($attractionsArray as $key => $innerArray) { $attractionArray[$key] = sort($innerArray, SORT_STRING); } print_r($attractionArray);
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '"Travel"' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/UEEIV on line 27
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /in/UEEIV on line 27
Process exited with code 255.