3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace WebSharks\Challenge; $a = ['patdumona', 'kristinedp', 'raamdes', 'renzmp', 'reedysete']; print_r[str_replace("a","d",$a,$i)];
based on EresF
Output for 7.2.0
Warning: Use of undefined constant print_r - assumed 'print_r' (this will throw an Error in a future version of PHP) in /in/coD84 on line 4 Warning: Illegal offset type in /in/coD84 on line 4
Output for 5.6.8 - 7.1.10
Notice: Use of undefined constant print_r - assumed 'print_r' in /in/coD84 on line 4 Warning: Illegal offset type in /in/coD84 on line 4
Output for 5.4.11 - 5.5.35
Parse error: syntax error, unexpected '[' in /in/coD84 on line 4
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/coD84 on line 3
Process exited with code 255.