-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 20.07.2012 02:09, schrieb Stas Malyshev: > Hi! > >> 2. It would be really useful to have 2 versions of each >> function: one which mutates the variable and one which returns >> the new variable. >> >> Example: >> >> <?php $src = 'SoUrCe'; $result = lowered($src); // $result == >> 'source', $src == 'SoUrCe' $result = lower($srd); // $result == >> true, $src = 'source' ?> >> > > I'm not sure I understand why. What's wrong with $src = > lowered($src);? Also, when lower() returns not true? If there's a > legitimate situation when it must return not true (I can't think > of any, but maybe for more complex functions there is) what > lowered() is supposed to do in the same situation? If it were user code, it should throw an exception. I don't know if your api redesign cares about exceptions or sticks with return codes and fatals. - - -- Ralf Lang Linux Consultant / Developer Tel.: +49-170-6381563 Mail: l...@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 - -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAI+acACgkQCs1dsHJ/X7DvJQCfW//nWFwOsJvEDGiBCN4VLHhA jgMAoMN9iCCf7lC5PJXf2w97C1i2oRQg =5Alm - -----END PGP SIGNATURE----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAI+d8ACgkQCs1dsHJ/X7DgrACgqUW0sJwD5dUerMZ692e6xugN d9YAoKEENtV16gHrKdgi6UK7mCx3h3xY =ZJFL -----END PGP SIGNATURE----- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php