Closed
Description
PHP 5.4.8
<?php
$finder = new \Symfony\Component\Finder\Finder();
$files = $finder->files()->name('validators.en.*')->followLinks()->in([
'/var/www/TestProject/src/TestProject/UserBundle/Resources/translations',
'/var/www/TestProject/vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/translations'
]);
foreach (iterator_to_array($files) as $file) {
/* @var $file \Symfony\Component\Finder\SplFileInfo */
var_dump($file->getRealPath());
}
# Output:
# string(110) "/var/www/TestProject/vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/translations/validators.en.yml"
foreach ($files as $file) {
/* @var $file \Symfony\Component\Finder\SplFileInfo */
var_dump($file->getRealPath());
}
# Output:
# string(84) "/var/www/TestProject/src/TestProject/UserBundle/Resources/translations/validators.en.yml"
# string(110) "/var/www/TestProject/vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/translations/validators.en.yml"