Browse Source

fixed array.reverse

Nicolas Cannasse 17 years ago
parent
commit
adf64ee0af
2 changed files with 2 additions and 2 deletions
  1. 1 1
      genphp.ml
  2. 1 1
      std/php/Boot.hx

+ 1 - 1
genphp.ml

@@ -712,7 +712,7 @@ and gen_array_call ctx s e el =
 		gen_value ctx e;
 		spr ctx ")"
 	| "reverse" ->
-		spr ctx "rsort(";
+		spr ctx "array_reverse(";
 		gen_value ctx e;
 		spr ctx ")"
 	| "shift" ->

+ 1 - 1
std/php/Boot.hx

@@ -262,7 +262,7 @@ class Boot {
 						case 'push':
 							__php__("return php_Boot::__closure(array('o' => &$o), null, array('x'), 'return array_push($o,$x);')");
 						case 'reverse':
-							__php__("return php_Boot::__closure(array('o' => &$o), null, array(), 'return  rsort($o);')");
+							__php__("return php_Boot::__closure(array('o' => &$o), null, array(), 'return array_reverse($o);')");
 						case 'shift':
 							__php__("return php_Boot::__closure(array('o' => &$o), null, array(), 'return array_shift($o);')");
 						case 'slice':