3v4l.org

run code in 300+ PHP versions simultaneously
<?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'); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/Ge0hY
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'isbn_validateten'
          1        FETCH_R                      global              ~0      '_GET'
          2        FETCH_DIM_R                                      ~1      ~0, 'isbn'
          3        SEND_VAL                                                 ~1
          4        DO_FCALL                                      0  $2      
          5      > JMPZ                                                     $2, ->13
   17     6    >   INIT_FCALL                                               'header'
          7        FETCH_R                      global              ~3      '_GET'
          8        FETCH_DIM_R                                      ~4      ~3, 'isbn'
          9        CONCAT                                           ~5      'Location%3A+http%3A%2F%2Fad.zanox.com%2Fppc%2F%3F22806504C1206851698T%26ULP%3D', ~4
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
         12      > JMP                                                      ->14
   19    13    > > EXIT                                                     'Fehlerhafte+ISBN'
   21    14    > > RETURN                                                   1

Function isbn_validateten:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/Ge0hY
function name:  isbn_validateten
number of ops:  29
compiled vars:  !0 = $isbn, !1 = $chksum, !2 = $sum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 -1
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    5     7        INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 -1
         11        DO_ICALL                                         $5      
         12        ASSIGN                                                   !0, $5
    6    13        INIT_FCALL                                               'preg_match'
         14        SEND_VAL                                                 '%2FX%2Fi'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $7      
         17      > JMPZ                                                     $7, ->19
         18    >   ASSIGN                                                   !1, '10'
    7    19    >   INIT_FCALL_BY_NAME                                       'isbn_genchksum10'
         20        SEND_VAR_EX                                              !0
         21        DO_FCALL                                      0  $9      
         22        ASSIGN                                                   !2, $9
    8    23        IS_EQUAL                                                 !1, !2
         24      > JMPZ                                                     ~11, ->27
    9    25    > > RETURN                                                   1
         26*       JMP                                                      ->28
   11    27    > > RETURN                                                   0
   13    28*     > RETURN                                                   null

End of function isbn_validateten

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
254.76 ms | 1403 KiB | 21 Q