Mercurial > hg > webaudioevaluationtool
diff php/pool.php @ 2283:169f08dc9634
Fix for #25, PHP uses the array() function rather than the [] initialiser (only supported if PHP >= 5.4)
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Fri, 22 Apr 2016 09:34:34 +0100 |
parents | 30c012132427 |
children | d26623bd65e0 |
line wrap: on
line diff
--- a/php/pool.php Wed Apr 20 21:41:49 2016 +0200 +++ b/php/pool.php Fri Apr 22 09:34:34 2016 +0100 @@ -17,7 +17,7 @@ // Note this is relative to the PHP location // First set up the store with all the test page key nodes -$pages = []; +$pages = array(); $master_xml = simplexml_load_string(file_get_contents($master_file, FILE_TEXT)); if ($master_xml) { if (!isset($master_xml->setup["poolSize"])) @@ -72,12 +72,12 @@ $root->appendChild($dom_setup); // We must now extract the number which have been performed the least -$rot_pages = []; +$rot_pages = array(); foreach($pages as $key => $var) if(array_key_exists($var,$rot_pages)) { array_push($rot_pages[$var],$key); } else { - $rot_pages[$var] = [$key]; + $rot_pages[$var] = array($key); } ksort($rot_pages); $Keys = array_keys($rot_pages);