Re: cvs: pear /Validate/Validate ISPN.php

From: Date: Tue, 18 Oct 2005 08:41:56 +0000
Subject: Re: cvs: pear /Validate/Validate ISPN.php
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35664@lists.php.net to get a copy of this message
On 10/17/05, Helgi Þormar Þorbjörnsson <dufuz@php.net> wrote: > > dufuz Mon Oct 17 17:38:33 2005 EDT > > Modified files: > /pear/Validate/Validate ISPN.php > [snip] - $ismn = eregi_replace('ISMN', '', $ismn); > - $ismn = eregi_replace('M', '3', $ismn); // change first M to 3 > - $ismn = str_replace(array('-', '/', ' ', "\t", > "\n"), '', $ismn); > + $ismn = strtoupper($ismn); > + $ismn = str_replace(array('ISMN', '-', '/', ' ', > "\t", "\n"), '', > $ismn); > + ///FIXME probably wrong, this catches them all, have to check > + $ismn = str_replace('M', '3', $ismn); // change first M to 3 > [snip] Don't quite understand what this function is supposed to do. Didn't even find test cases for it to check the input. Anyone care to insert couple of words describing the logic behind? Anyhow, looking for something like this?: if($pos = strpos($ismn, 'M') !== false) { $ismn{$pos} = 3; }

« previous php.pear.cvs (#35664) next »