PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/good/ext/standard/tests/array/bug34982.php

http://github.com/facebook/hiphop-php
PHP | 18 lines | 15 code | 3 blank | 0 comment | 0 complexity | 5a683e98cf3ef45d28edfbabf4d75aad MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  1. <?php
  2. $ar = array(
  3. 'element 1',
  4. array('subelement1')
  5. );
  6. func($ar);
  7. print_r($ar);
  8. function func($a) {
  9. array_walk_recursive($a, 'apply');
  10. print_r($a);
  11. }
  12. function apply(&$input, $key) {
  13. $input = 'changed';
  14. }
  15. ?>