3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_0 = ['foo']; $array_1 = ['bar']; for ($i = 0; $i <= 1; $i++) { print_r(${'array_' . $i}); // Here we "build" the variable name }

preferences:
48.73 ms | 1493 KiB | 5 Q