3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function Store($ipAddress){ global $return; $return="success"; if(is_writable("./tracker/addresses.txt")) { //Skriver datan till filen $myFile = "./tracker/addresses.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = $ipAddress; fwrite($fh, $stringData . "\n"); fclose($fh); } else { //File not writeable $return="error"; } //return is used for javascript handling later on - nothing related } ?>
Output for 4.3.0 - 7.1.0