[TYPO3-core] RFC: Fix bug #1391: Typo3 can't display a single "0" in a table cell
Bernhard Kraft
kraftb at kraftb.at
Tue Feb 28 06:04:31 CET 2006
Michael Stucki wrote:
> The solution is to add a new property which compares the value using
> strcmp('',$value).
Don't use strcmp if you don't really want to compare the string. If you
want to test if it is set rather use strlen($str).
Here the output of a little test program:
Time for 1000000 strlen: 0.866 (100%)
Time for 1000000 strcmp(): 0.971 (112.15%)
Result OK
Time for 1000000 strlen: 0.878 (100%)
Time for 1000000 strcmp(): 0.967 (110.12%)
Result OK
Time for 1000000 strlen: 0.870 (100%)
Time for 1000000 strcmp(): 0.970 (111.50%)
Result OK
Fine ?
I attach it so you can proove it yourself (Change the $tv Test values variable and
try a longer string ... it doesn't change much)
greets,
Bernhard
--
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strlen.php
Type: application/x-php
Size: 1045 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060228/1d1b5a1b/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060228/1d1b5a1b/attachment.pgp
More information about the TYPO3-team-core
mailing list