#!/usr/bin/env php $code, 'rb-mysql.php' => $codeMySQL, 'rb-postgres.php' => $codePostgres, 'rb-sqlite.php' => $codeSQLite ); foreach( $files as $file => $content ) { echo 'Okay, seems we have all the code.. now writing file: ', $file ,PHP_EOL; $b = file_put_contents($file, $content); echo 'Written: ',$b,' bytes.',PHP_EOL; if ($b > 0) { echo 'Done!' ,PHP_EOL; } else { echo 'Hm, something seems to have gone wrong... ',PHP_EOL; } }