<?php
$fileIn = "php://stdin";
$fileOut= "php://stdout";
$line_looking = 16; //lembre que a contagem começa em 0
$lines = file($fileIn, FILE_IGNORE_NEW_LINES
); $lines[$line_looking] = 'Linha substituida';
PD9waHAKCiRmaWxlSW4gPSAicGhwOi8vc3RkaW4iOwokZmlsZU91dD0gInBocDovL3N0ZG91dCI7CiRsaW5lX2xvb2tpbmcgPSAxNjsgLy9sZW1icmUgcXVlIGEgY29udGFnZW0gY29tZcOnYSBlbSAwCgokbGluZXMgPSBmaWxlKCRmaWxlSW4sIEZJTEVfSUdOT1JFX05FV19MSU5FUyk7CiRsaW5lc1skbGluZV9sb29raW5nXSA9ICdMaW5oYSBzdWJzdGl0dWlkYSc7CmZpbGVfcHV0X2NvbnRlbnRzKCRmaWxlT3V0LCBpbXBsb2RlKCJcbiIsICRsaW5lcykpOw==
dW0KZG9pcwp0cmVzCnF1YXRybwpjaW5jbwpzZWlzCnNldGUKb2l0bwpub3ZlCmRlegpvbnplCmRvemUKdHJlemUKcXVhdG9yemUKcXVpbnplCmRlemVzc2VpcwpkZXplc3NldGUKZGV6b2l0bwpkZXplbm92ZQpiZWludGU=
um
dois
tres
quatro
cinco
seis
sete
oito
nove
dez
onze
doze
treze
quatorze
quinze
dezesseis
dezessete
dezoito
dezenove
beinte