3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [1,2,3,4,5,6,7,8,9]; array_walk_recursive($a, function ($key, $value) {$value+=1;}); echo $a;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Warning: Array to string conversion in /in/9X9nN on line 5 Array
Output for 5.6.0 - 5.6.27, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Notice: Array to string conversion in /in/9X9nN on line 5 Array
Output for 7.3.32 - 7.3.33
Array

preferences:
195.88 ms | 401 KiB | 217 Q