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; } } if(isbn_validateten($_GET['isbn'])) { header("Location: http://ad.zanox.com/ppc/?22806504C1206851698T&ULP=".$_GET['isbn']); } else { die('Fehlerhafte ISBN'); } ?>
Output for 7.0.0 - 7.1.0
Notice: Undefined index: isbn in /in/Ge0hY on line 16 Fatal error: Uncaught Error: Call to undefined function isbn_genchksum10() in /in/Ge0hY:7 Stack trace: #0 /in/Ge0hY(16): isbn_validateten(false) #1 {main} thrown in /in/Ge0hY on line 7
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Notice: Undefined index: isbn in /in/Ge0hY on line 16 Fatal error: Call to undefined function isbn_genchksum10() in /in/Ge0hY on line 7
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Notice: Undefined index: isbn in /in/Ge0hY on line 16 Fatal error: Call to undefined function isbn_genchksum10() in /in/Ge0hY on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined index: isbn in /in/Ge0hY on line 16 Fatal error: Call to undefined function: isbn_genchksum10() in /in/Ge0hY on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined index: isbn in /in/Ge0hY on line 16 Fatal error: Call to undefined function: isbn_genchksum10() in /in/Ge0hY on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined index: isbn in /in/Ge0hY on line 16 Fatal error: Call to undefined function: isbn_genchksum10() in /in/Ge0hY on line 7