<?php
$values = array(
'one' => array(
'title' => 'Title One',
'uri' => 'http://example.com/one',
),
'two' => array(
'title' => 'Title Two',
'uri' => 'http://example.com/two',
),
);
$a = function($values) {
$return = array();
foreach($values as $value)
$return[] = '<a href="' . $value['uri'] . '">' . $value['title'] . '</a>';
return $return;
};
echo ($a instanceof Closure);
$final_string = implode(' | ', (function($values) {
$return = array();
foreach($values as $value)
$return[] = '<a href="' . $value['uri'] . '">' . $value['title'] . '</a>';
return $return;
}()));
echo $final_string;
- Output for 5.3.25 - 5.3.26, 5.4.16
- Parse error: syntax error, unexpected '(' in /in/Ep8lV on line 32
Process exited with code 255. - Output for 5.3.0 - 5.3.24, 5.4.0 - 5.4.15
- Parse error: syntax error, unexpected '(' in Ppnla on line 32
Process exited with code 255.
preferences:
176.53 ms | 1395 KiB | 51 Q