<?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);
echo ($a($values) instanceof array);
$final_string = implode(' | ', $a($values));
echo $final_string;
- Output for 5.4.16
- Parse error: syntax error, unexpected 'array' (T_ARRAY) in /in/i4WRE on line 24
Process exited with code 255. - Output for 5.4.0 - 5.4.15
- Parse error: syntax error, unexpected 'array' (T_ARRAY) in 7dAJl on line 24
Process exited with code 255. - Output for 5.3.25 - 5.3.26
- Parse error: syntax error, unexpected T_ARRAY in /in/i4WRE on line 24
Process exited with code 255. - Output for 5.3.0 - 5.3.24
- Parse error: syntax error, unexpected T_ARRAY in 7dAJl on line 24
Process exited with code 255.
preferences:
185.59 ms | 1395 KiB | 51 Q