@burhancepni;

eski.txt;
laravel
yeni.txt;
javascript
test.php
<?php
	
	function clean_empty_lines(array $array)
	{
		foreach($array as $key => $value)
		{
			if(empty($value))
			{
				unset($array[$key]);
			}
		}
		
		return array_values($array);
	}
	
	$text = "laravel codeigniter symfony zend";
	
	$from = clean_empty_lines(explode("\n", trim(file_get_contents("eski.txt"))));
	$to = clean_empty_lines(explode("\n", trim(file_get_contents("yeni.txt"))));
	
	$text = str_replace($from, $to, $text);
	
	echo $text;
çıktı;