3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function isbn_validateten($isbn) { $isbn = str_replace(array(' ', '-'), '' $isbn); $chksum = substr($isbn, -1, 1); $isbn = substr($isbn, 0, -1); if (preg_match('/X/i', $chksum)) { $chksum="10"; } $sum = isbn_genchksum10($isbn); if ($chksum == $sum){ return 1; }else{ return 0; } } #$_GET['isbn'] if(isbn_validateten($isbn = '123')) { header("Location: http://ad.zanox.com/ppc/?22806504C1206851698T&ULP=".$_GET['isbn']); } else { die('Fehlerhafte ISBN'); } ?>
Output for 5.4.0 - 5.4.6
Parse error: syntax error, unexpected '$isbn' (T_VARIABLE) in /in/bgjFJ on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.16
Parse error: syntax error, unexpected T_VARIABLE in /in/bgjFJ on line 3
Process exited with code 255.