From 3617703f3a027868e18c119a6040d3ff5b4376f0 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 20 Jul 2016 14:19:09 -0700 Subject: [PATCH] Fixed incorrect array_map example --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eeb5fbc..817169a 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,14 @@ then use it with any array_* function. ```php $arrObj->array_keys(); $arrObj->array_values(); -$arrObj->array_map(function($arr) { return array_keys($arr); }); +$arrObj->array_map( + function($value) { + print sprintf("%s\n", $value); + } +); ``` +array_map(function($value) { +print sprintf("%s\n", $value); }, $arr)); use the normal `\ArrayObject` methods ```php $arrObj->exchangeArray($myNewArray); @@ -28,3 +34,4 @@ MIT ## Todo Finish writing the rest of the tests for array_* functions +