« first day (1702 days earlier)      last day (3472 days later) » 

20:00
I have wordpress question
regarding to this instructions:
Anonymous
maybe it's just me .. but everything below this line could've been done using a single _call() method or I have seriously missed something,
Anonymous
Anonymous
@user4571629
Can someone please help me how link to this single-post.php ?
I don't have enought points to login to the chat : (
so sad
The Wordpress channel requires more points than here? Someone should fix that! =P
20:12
@samaYo could have but not should have
@samaYo what Gordon said. Having it as such gives you IDE auto-completion
@FlorianMargaine you can have autocompletion by annotating the class though: stackoverflow.com/questions/3814733/…
Anonymous
@FlorianMargaine that is just wow..
@Gordon lol
sorry, that was irony
err
sarcasm may be a better word
Anonymous
when @Gordon say's something is a bad idea, you don't ask why, You just believe and move on.
20:18
@samaYo nah. you should never do that
"something something because IDE" is not a good reason, imho
@samaYo I'm not fond of magic methods ever since I worked with ZF1. It's a pain to debug them, they are non-obvious to figure out and the code in them is usually butt ugly.
@samaYo call sux
and mocking __call is ugly, too
Anonymous
@Gordon Agreed, but what irked me about that class is that creator was aiming for optimization down to the last byte .. and it seemed reasonable to expect these 8 methods be replaced in favor of one..
Anonymous
20:23
even has a benchmark against fastroute github.com/baryshev/FastRoute-vs-TreeRoute
@samaYo I would assume __call is going to be slower
call has some overhead
@samaYo well, I assume he just added them for convenience. technically, he could just use addRoute
also all those methods shouldn't even exist
yeah, they are just shortcuts
i miss code coverage x_x need to check manually if i have tested every method
Anonymous
Yeah, it would be nice though (for a non C-savvy people) if PHP could provide some detailed info on how each of the language constructs fare against eachother ..
Anonymous
20:28
it would help with code optimization and stuff...
@samaYo ?
@samaYo less code == better
well, generally :D
Anonymous
my motto
:( 3v4l broke the opcodes thingy
Things that happen if you're using __call: github.com/colinmollenhour/credis/blob/master/…
20:35
Holy shit
@PeeHaa I know - that is missing so many functions - github.com/nrk/predis/blob/v1.0/src/ClientInterface.php#L27
nice example
omfg
:P
20:41
It actually makes sense for the redis protocol - it allows new commands to be implemented without changing the library code, as well as not having a bazillion functions that just pass the call on.
Time: 1.49 seconds, Memory: 12.00Mb
OK (174 tests, 1066 assertions)
yay! all passing (at first try :P)
Woah at the tests / assertions ratio
Anonymous
lol
@PeeHaa i was tired having a method for every single test
especially my mouse wheel was :P
Anonymous
seconds to test ratio is also impressive
20:52
so now i have 1:1. and extending phpunit i also test exceptions within the same method
$this->assertException(ErrorSequenceIndexOutOfBounds, function() use($tuple){ $tuple->addIndex(7, 7); });
@PeeHaa
@samaYo php7! was much slower with php 5.6
@Danack Yeah, it makes sense as long as you don't want to expose a slightly improved API.

« first day (1702 days earlier)      last day (3472 days later) »