Those who know don't speak. Those who speak don't know.
You can see this live in
internals - lots of unknown people discussing their view on the future of PHP, even though most of them haven't ever seen the sources or (god forbid) never contributed a line.
Guys, if you really want to contribute to PHP project, send me some
.phpt tests, no need to add yet another email to the endless thread (nobody is going to read it anyway).
On the subject of tests.. has anyone thought about using SimpleTest rather than phpt? I'd find that much easier to read and to write:
--TEST--
Check for exif_read_data, unusual IFD start
--SKIPIF--
< ?php
if (!extension_loaded('exif')) print 'skip exif extension not available';
?>
--FILE--
< ?php
/ Do not change this test it is a REATME.TESTING example.
test5.jpg is a 1*1 image that contains an Exif section with ifd = 00000009h
*/
$image = exif_read_data('./ext/exif/tests/test5.jpg','',true,false);
var_dump($image['IFD0']);
? >
--EXPECT--
array(2) {
["ImageDescription"]=>
string(11) "Ifd00000009"
["DateTime"]=>
string(19) "2002:10:18 20:06:00"
}
class WhenReadingExifData extends UnitTestCase {
function skip() {
$this->skipIf(
!extension_loaded('exif'),
'exif extension not available');
}
function testUnusualIFDStart() {
$expected = array{
"ImageDescription"=>"Ifd00000009"
"DateTime"=>"2002:10:18 20:06:00");
$image = exif_read_data(
'./ext/exif/tests/test5.jpg',
'',
true,
false);
$this->assertIdentical(
$image['IFD0'],
$expected);
}
}
>on what sort of user interface it should present or what it should do.
Sure, you may have an opinion, but don't seriously expect anybody to take it into account.
That's why I'm trying to encourage everybody to spend time on something more useful like writing tests (which doesn't require any knowledge of internals).
Btw, this way you may make yourself known to the community and your opinion may gain some weight.
>On the subject of tests.. has anyone thought about using SimpleTest rather than phpt?
No, that's not an option.
The main advantage of run-tests.php is that every test is executed separately and we're able to catch crashes/memleaks/other problems right at the end of certain test.
>I'd find that much easier to read and to write:
Oh, I don't think this bunch of methods is more readable than a short & complete script.
of course it's important to get feedback from users but it's bad if 90% of the developer's list is made by endless discussions then it's a problem.
johannes
The recent discussions between people who have no idea are a bit annoying .. But its an open list, people don't really listen to them anyway and I'm sure it will pass..
But I do.
Let me give you an example. There's something quite important missing from php exceptions. If, as you say, you have nothing to learn from outsiders you'll know about this already. If not, I've got a useful idea to contribute even though I've never written a line of code for php.
So: what am I talking about?