<?php

$conf = file_get_contents('update-conf-file.txt');


$conf = preg_replace('/^(needspeeling)(|\s*\S*)$/mi', '; $1', $conf);


$conf = preg_replace('/^;?\s*(seedsremoved)/mi', '$1', $conf);


$conf = preg_replace('/^(numberofbananas)(|\s*\S*)$/mi', '$1 1024', $conf);


if (preg_match('/^;?\s*(numberofstrawberries)/mi', $conf, $matches)) {
    $conf = preg_replace('/^(numberofstrawberries)(|\s*\S*)$/mi', '$1 62000', $conf);
} else {
    $conf .= 'NUMBEROFSTRAWBERRIES 62000' . PHP_EOL;
}

echo $conf;