- array_map: documentation ( source)
- get_defined_vars: documentation ( source)
- var_export: documentation ( source)
- explode: documentation ( source)
<?php
$vals = "1,3,4,7";
var_export(
array_map(
fn($id) => get_defined_vars(),
explode(',', $vals)
)
);