« first day (676 days earlier)      last day (4272 days later) » 

6:00 PM
@LeviMorrison blog about it, use "benchmark" in the article title.... you'll get millions of visitors!
 
@JoeySalacHipolito , i cannot , but the titles sound bad
 
@SomeKittens I wonder why the down vote too, have an up in return. :)
 
hahaha... the architct books talks about all design patterns ..
 
@salathe I will change your function to use max instead of doing the if's in PHP for consistency's sake.
 
6:02 PM
i need to find better books in that case
 
@LeviMorrison urgh, whyyyy
 
@LeviMorrison Uhm, did you actually benchmark both versions? I can see it go either way
 
(that's code for "go for it")
 
@NikiC No, I'm about to:
3 mins ago, by Levi Morrison
Out of curiousity I will do some basic and probably incorrect testing of my stack-based solution and @salathe's array_walk_recursive.
 
0
A: Replace Leading zero with '+' in PHP

salatheUse substr_replace(), no need for regex or if blocks. $number = '07512345678'; $country_code = '44'; $new_number = substr_replace($number, '+'.$country_code, 0, ($number[0] == '0'));

 
6:03 PM
obviously the only real solution to this problem is max($recursiveArrayIterator). Sadly PHP doesn't support that right now
 
*shameless rep whoring in the chats*
@NikiC read the question, too much memories!
@NikiC max($recursiveArrayGenerator) :P
 
@salathe which Q?
 
@salathe upvoted because people reach for regex too quickly.
I don't know why they do that.
 
@NikiC Not upvoted because no-one's heard of substr_replace() before? :(
oops, wrong reply link
 
@tereško what can you say about symfony?
 
6:06 PM
@LeviMorrison Once you've found a hammer…
 
@LeviMorrison I feel like the regex solution is more readable in this case.
 
@JoeySalacHipolito , i did not say that the books were bad , i jsut said taht titles did not sound all that promising
 
With substr_replace($number, '+'.$country_code, 0, ($number[0] == '0')); I'd have to first think about what it does. Regex is obvious on the other hand
 
@JoeySalacHipolito , i have not formed an opinion about it yet
 
@NikiC it absolutely is easier to read
 
6:06 PM
hahaha...i'll keep the books anyway, since i already started reading them..
oh.
 
and why do you keep asking "what do you think about framework X"
who gives a fuc k ?!
if you want to learn about a framework, then read the damned source
 
word
 
hehehe, yeah, thanks!, i just want to hear your opinion..
 
and what if i am full of shit ?
 
@salathe wonder who downvoted... nothing obvious to downvote..
 
6:09 PM
hahaha, i don't think so..hahaha..
 
basing you own opinions on some online wannabe-experts is the worst thing you can do
 
@webarto Bet it was @NikiC
 
:D sorry about that
 
@salathe yeah, he would have done s/0/+ @NikiC :P
go ZF!
 
6:13 PM
woo
 
I think symphony is the best thing to ever happen to the internet since jQuery and Facebook. If you aren't using symphony, you probably were born breech or were dropped on your head; you hate babies, and America, you can't stand the taste of raspberry, you wear your underwear backward and see nothing wrong with it. If I see PHP that ISN'T written for symphony, I delete it with no remorse. Even if it is production code. Then I take a magnet to the server it was on.
 
@NikiC I have some tests running with a heavily nested array.
 
I think Kohana is dead, no commits over 6 months, and almost a year behind 3.3 :D
 
Question about my test script, though.
function testFunction($callable, $array) {
    echo "$callable: ";
    $startTime = microtime(TRUE);
    call_user_func($callable, $array);
    $timeTaken = microtime(TRUE) - $startTime;
    echo "$timeTaken\n";
}
^ Is that suitable?
 
ahahaha @chris
 
6:14 PM
In this case I know the $callable will be sent as a string.
 
@LeviMorrison you could take away the work of call_user_func() and just use $callable($array)
 
Noted.
 
hiya
 
These tests will take a long time.
 
@Chris I love America, and I live in a country which is 2nd producer of raspberries in the world, but I don't use Symfony and never will :D
 
6:16 PM
@LeviMorrison it mostly just means you won't need to wait as long for the tests to finish :P
 
How many times should I iterate on them? 3? 5?
 
300,000!
 
user895378
FWIW I prefer to stick operations inside a loop and look at xdebug output with kcachegrind for benchmarking instead of manually checking micro timestamps myself
 
user895378
It's a more robust way to benchmark ...
 
@webarto Breech born -- you came out backwards and never recovered.
... or, that was sarcastic, and symphony is junk
 
6:17 PM
@rdlowrey No, not at all
@rdlowrey Not for microbenchmarks at least
 
user895378
@NikiC I like the pretty pictures :)
 
sup
 
user895378
Wouldn't the xdebug overhead be invariate for two different methods?
 
XDebug has a hell lot of overhead and can easily mess your microbenchmark completely up
@rdlowrey E.g. in @LeviMorrison's case running with xdebug would probably make the recursive version a lot slower than it actually is (because it has more function calls)
 
How many iterations should I do? 5?
 
6:19 PM
@LeviMorrison who cares? make it run > 1s and it's okay
 
user895378
@NikiC I see.
 
user895378
Good to know.
 
12
Q: Add a "do not ask canihaztehcodez questions" admonition to the FAQ

PeeHaaIn the #dontask section of the faq there is a nice list of things people shouldn't ask. Can the item be added that SO is not for questions like: "I'm looking for a script" type of questions. I don't know how it is in other languages, but in [php] there are a lot of canihaztehcodez type of questi...

 
user895378
Good thing I haven't been benchmarking low-level data structures for 3rd party use all this time :)
 
PHP 5.5 doesn't support Windows XP anymore, eh? ... aaaaand I'm switching to a new language. Seriously annoying.
 
user895378
6:22 PM
I'm always baffled why so many people want to run php on windows :)
 
Yeah, I remember working on some code 2 jobs ago that took a minute or so to execute, I tried xdebug profiling it to figure out why it was so slow, and the execution time shot up to 5 minutes. Wasn't fun :)
 
Development convenience
 
user895378
It's soooooo easy to setup a VM though.
 
@rdlowrey I'm always baffled why so many people want to run php on windows XP
 
My computer uses XP. I want a local development server so I can easily find&replace in files. So... I need PHP to work on XP
 
6:23 PM
@Chris Switch to a new OS. You'll be better off :)
 
Okay, Steve Jobs, I'll hold my phone differently
 
Hold Different.
 
a) at companies with 100s of desks, it is not practical to demand OS upgrades
 
VM?
 
b) I don't want to switch my home computers, I like XP just fine
VM or just learn a language that doesn't abandon half the computer users in the world
 
6:25 PM
@Chris I removed XP few days ago in favor of Windows 8, and I think PHP will still work on XP... it will be just unsupported... but real thing is Linux...
 
I don't want to use Linux on my home computer
 
Windows 7/8 ?
 
I'm seriously peeved about this. I had heard rumors, but I wasn't expecting it so soon
 
Microsoft are ditching XP in the near future, why should third parties keep supporting it?
 
It does not quite get in my mind how software developers can use an OS that's already a decade old.
 
6:26 PM
Because it works just fine
There's no reason to change
 
@Chris I used it too, it was only Windows that worked for me... still is...
 
@Chris , because most of developers do not understand security
 
I mean, the same people who complain why all those stupid people use IE6 are also the ones who complain when WinXP support is dropped
 
IE6 is not the same scenario as XP, that's apples and oranges
 
Works just fine? It's got more holes than a fine swiss cheese. And it looks like an episode of Teletubbies.
2
 
6:27 PM
^LOL
 
XP is still as secure as I need it to be. There are no standards for OSes out there that XP does not conform to
 
@GordonM xp will be supported until 2014 IIRC
 
So about a year and a half or so then?
 
Something like that
 
IE6 is an active impediment to web standards. XP is not holding PHP back from adding traits
 
6:29 PM
@PeeHaa Windows XP support ended in 2009. It is on "Extended Support" right now, which will end in 2014.
 
@NikiC svn.php.net/viewvc/php/php-src/trunk/win32/build/… does this mean PHP will refuse to run or just notice...
 
I personally think Windows 7 is clunky. Plus, my perfectly functional home computer doesn't have the hardware to make it look OMGAWESOME LIEK A MAC!! while I type code
 
@Chris Someone must have looked at the proposed feature set, the OS features needed to implement said features, did some back of the envolope figuring and decided that the effort needed to ensure XP compatibility was not worth the effort required.
 
pissed
 
PHP is open source so you're free to backport it if it's that big a deal to you.
 
6:31 PM
That's super-practical
 
Win 7 doesn't look anything like a Mac. Trust me ;)
As practical as runnign a decade old OS because you can't / wont upgrade your hardware or switch to Linux (which given PHP is typically used to run server side scripts on a LAMP stack is far closer to the environment your scripts will probably operate in anyway)?
 
@Chris I don't know what 'puter you have, but Win8 is running I dare to say, faster than XP on 1.8 dual core with 1GB laptop... no lag or anything...
 
Next blog post going live in 30 minutes
 
^ make-up stuff :P
@Chris fsck Mac :P
 
Windows XP works just fine, like a champ. I've never been actively blocked from doing anything I've ever wanted to do, and over my career I've done a pretty good variety of things. My education is in network admin, so I am also quite familiar with the security considerations of XP, as well as the inner workings of the OS, and with Linux. I simply prefer XP, I prefer to develop on PHP+XP.
 
6:35 PM
Besides, Zend keep the previous from current version of PHP under maintenance don't they? You'll be able to have a current PHP 5.4 on XP for as long as 5.5 remains the current version.
 
> I'd also like to call out to the developers and maintainers of Symfony 2, Fuel 2, and all other frameworks and libraries using a Service Locator: Stop calling it dependency injection. It's not. Calling it a "Dependency Injection Container" just confuses the issue. Call it what it is, a Service Locator. Otherwise you devalue the term "Dependency Injection" to a mere buzz-word that has no meaning. And that is detrimental to the community...
6
 
@NikiC @salathe @rdlowrey The array_max_recursive benchmark.
 
@ircmaxell Yes, I am agree.
 
I am agree. Not heard that one in a while.
 
That's the last paragraph from my new post
 
6:37 PM
Unless I botched the tests badly, my version is by far the fastest on various nest levels.
 
Greetings gentlemen
 
I love how one of the top tags on my blog is
 
Merge conflict ┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻
Rebase (ノಠ益ಠ)ノ彡┻━┻
Clean git ┬─┬ノ( º _ ºノ
Dirty git (╯°□°)╯︵ ┻━┻)
 
If anyone can contribute to this question, it would be appreciated as I am about to set my hair on fire trying to solve it: stackoverflow.com/questions/12078564/…
Or an upvote would be appreciated too :)
 
6:38 PM
@HenrikPetterson If you want rep you should start answering questions
 
@NikiC I should have said "on my very powerful windows box".
 
@LeviMorrison And could you add a "normal" recursive version, please?
 
Sorry.
 
@LeviMorrison With XDebug running?
 
@NikiC . . . unsure.
I know I have it installed
Does that automatically make it run?
 
6:40 PM
@PeeHaa I am not looking for increasing my points. I was only looking for a solution to the question that I linked. I only suggested the upvote so that more users would see it in hopes for a workable solution.
 
@LeviMorrison: C is 20% faster here
 
Not too familiar with XDebug. Have it for code coverage in my tests.
 
@HenrikPetterson wtf is this: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>?
 
@LeviMorrison Then it is enabled and you might get wrong results ;)
 
@NikiC Then I don't have a test box without it.
I have it installed at work.
 
6:41 PM
@LeviMorrison php -n file.php
 
@HenrikPetterson Looks like you are intentionally are making your code hard to read
 
@PeeHaa It is from The Loop: codex.wordpress.org/The_Loop
 
Will produce hard to spot errors at some point
@HenrikPetterson Yuck! ;)
 
@PeeHaa Yeah I have been on this issue all day and my mind is literally on the edge of destruction.
 
@NikiC I'll add one to the suite.
 
6:43 PM
@HenrikPetterson Let me read the question (no guarantees though)
 
@PeeHaa Cheers mate!
 
@NikiC Suitable?
function MaxArrayD($arr) {
    $max = FALSE;
    foreach ($arr as $value) {
        if (is_array($value)) {
            $max = max($max, MaxArrayD($value));
        } elseif (filter_var($value, FILTER_VALIDATE_INT) !== FALSE) {
            // max(NULL, 0) returns NULL, so cast it
            $max = (int) max($max, $value);
        }
    }
    return $max;
}
 
wordpress is horrible... I'm ashamed sometimes that PHP is associated with that...
 
Good thing. It just keeps reminding me of making some progress with my blogging platform ;)
 
@LeviMorrison probably
 
6:46 PM
So yeah, it looks like Xdebug murders recursive calls :)
To be expected.
 
@webarto: Wordpress came out in 2003 on PHP 4.3, it wasn't that bad then
 
@netcoder it's like XP...
 
they just missed so many chances of making a major overhaul to it
 
@Chris Btw, one reason to drop WinXP is so PHP can use new Windows APIs ;)
Quoting out-of-context "there's new stuff in threads, locking (see the slim read/write lock stuff which I love love), networking... there's lots of cool new apis, most of which came with vista - symlinks..."
 
When I heard WP3 was coming I thought "finally they're going to recode it in proper PHP5"
I was disappointed
 
6:49 PM
I've not so much as looked at any PHP code since last Friday. I hadn't realised just how burnt out on it I was. I'm also beginning to realise I'm going to need a lot more than one week off to fully recover.
 
@HenrikPetterson No idea how that unreadable crap should work, but the reason you are getting errors when running the code of the answer is because you have some unclosed statements.
<?php $show_author_data = TRUE;?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<?php if(!$show_author_data){ ?>
  About <?php the_author(); ?>, the author of this blog
  <?php userphoto_the_author_thumbnail() ?>
  <?php get_the_author_meta( 'description' ); ?>
<?php $show_author_data = FALSE; } ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
 
@PeeHaa Which ones are you referring too? If you can, please post a respond with a suggested code and I can run it to see if it works.
 
See above
 
C:\Users\Levi\Projects\PHP-Datastructures>php -n test.php 18 5
========================================
Function 'a' at nest level 18 and 5 iterations:
Min:0.44252991676331
Max:0.44453120231628
Average:0.44344696998596
========================================
Function 'b' at nest level 18 and 5 iterations:
Min:0.50260806083679
Max:0.5057270526886
Average:0.50390844345093
========================================
Function 'c' at nest level 18 and 5 iterations:
Min:0.31147193908691
Max:0.31376910209656
 
Let me run it, one moment.
 
6:52 PM
@netcoder WP is the biggest hack there is... I don't think it is going to change...
 
@PeeHaa I added it to author.php and it did not return anything unfortunately.
 
@webarto: yeah I doubt it will
 
@hakra tnx for directing people to my answer :P stackoverflow.com/questions/11923272/…
 
but hey, PHP itself is badly coded too ;-)
 
/me is confused. It appears that Symfony 2's service locator is really a DIC
 
6:54 PM
@HenrikPetterson In that case I[m sorry
 
so Symfony is using proper Dependency Injection, but then they are also using that same container as a service locator (causing the issues)
 
C:\Users\Levi\Projects\PHP-Datastructures>php -n test.php 18 5
========================================
Function 'a' at nest level 18 and 5 iterations:
Min:0.45035099983215
Max:0.46227097511292
Average:0.45572080612183
========================================
Function 'b' at nest level 18 and 5 iterations:
Min:0.50284910202026
Max:0.51233386993408
Average:0.50775055885315
========================================
Function 'c' at nest level 18 and 5 iterations:
Min:0.31112694740295
Max:0.31495690345764
 
@PeeHaa Don't worry dude, thanks for the input regardless. Hopefully someone will come through.
 
It seems that at least on my Win 7, 5.3.15 cli without Xdebug, MaxArrayC is the fastest, which is @salathe's version.
But, as would be expected, they are all very fast.
 
Any idea how to process multiple Ajax requests in PHP without server "lockup"? i got a page that loads ajax call 1 to process something, and then another ajax request 2 to process something else... call 1 takes about 20 seconds... however call 2, which takes 1 second, never returns until after the longer call 1 is returned...
in fact I can't even load any other pages on the site from the same server until call 1 returns... don't think it's an ajax issue.. is this a PHP/Apache issue or something else?
 
6:56 PM
@salathe's version is also the most simple to understand.
 
@bobby: depending on your session handler, you'd have to make sure you close your session as soon as you don't need it anymore (see session_write_close())
 
@NikiC Is there a way to measure memory?
 
@LeviMorrison memory_get_usage
 
That's probably a more important test than speed.
@NikiC But how would I write tests with it?
 
@netcoder ahh! that must be it! thanks -- you just saved me a bunch of time!
 
@LeviMorrison Easiest way is memory_get_peak_usage and running it four times in different scripts ^^
 
Use memory_get_peak_usage and use different scripts?
Ah, too slow.
:)
 
Fuqing finally got it to work.
 
<?php if ( have_posts() ) : the_post(); ?>

About <?php the_author(); ?>, the author of this blog
<?php userphoto_the_author_thumbnail() ?>
<?php echo get_the_author_meta( 'description' ); ?>

<?php rewind_posts();

while ( have_posts() ) : the_post(); ?>

<?php //loop stuff ?>

<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
 
Add author meta information after if ( have_posts() ) doesn't make it loop.
 
@ircmaxell You know, something never sat right with me with those things the frameworks kept calling DI containers.
They all felt an awful lot like registries to me.
 
@ircmaxell You are missing static there ;)
In the first code snippet
 
@NikiC I looked at that example for a while.
 
so ... anyone ever has implemented OpenID , or has come across implementation that does now make one to throw things ?
@GordonM , because they kinda are
 
7:05 PM
@NikiC fixed
 
@tereško Just goes to show really. If something gets a bad name, change the name.
 
@ircmaxell "And no, (what?) Fuel 2 has is not Dependency Injection."
 
@webarto huh?
 
@ircmaxell "And no, Fuel 2 has is not Dependency Injection." are you missing a "what" before Fuel 2 or is it correct this to say it this way?
 
@ircmaxell you accidentally a word
 
7:10 PM
fixed
 
So anyway, seems to be a bit of stuff about 5.5 popping up today. Have they drafted up a feature list for it or something?
 
posted on August 22, 2012 by Anthony Ferrara

Yesterday, I got in an interesting conversation on twitter about object scopes and what constitutes a global scope. The discussion started around a piece of code that I stumbled upon from Fuel 2.0. I am a firm believer that service containers are not a form of Dependency Injection, and are only slightly better than global variables. That led me to make a few comments that elicited a reply from

 
Late to the game, mister PHP feeds bot.
 
in JavaScript, 22 secs ago, by Neal
http://facebook.stackoverflow.com/questions/12079177/event-subscribe-still-down
 
damn rep cap. I need delv power :(
 
7:25 PM
You need it
You really do
 
user680786
Hello
 
user680786
please, advice good domain registrar
 
7:47 PM
@ircmaxell

"The everywhere clause is satisfied if the variable change be changed from an unknown (or non-deterministic) number of places."

...should be

"The everywhere clause is satisfied if the variable can be changed from an unknown (or non-deterministic) number of places."


error is: "change be changed'
 
fixed
 
@OZ_ namecheap
 
Strange. I found a site to practice programming but the problems seems too hard for me to solve at least in PHP.
 
@JaakkoSeppälä project euler?
 
@ircmaxell You may not agree here, but what about using a static for the active user? I tend to do that: user::isLoggedIn() and so on. To me, that's no more or less global than using $_SESSION. I think it's clear, consistent, and state is controlled by methods, that's okay if unrelated code changes it.
 
7:54 PM
@Chris How would you test it?
 
Test the user class itself, or code that depends on it?
 
all of it
 
No. A Finnish site ohjelmointiputka. One problem asks for example to determine regular expression to test divisibility by 7 but I don't understand what is a mistake in code in codegolf.stackexchange.com/questions/3503/…
 
The user class is stand-alone, testable alone. Code that depends on it has to have it via bootstrap, or mocked. Admittedly, it creates a dependence (hidden, sort of), but I am talking mainly about web applications or websites where knowledge of the user is important, needed universally, and truly is a global state already
 
@Chris How do you mock static method calls?
 
7:57 PM
Your mock class would, admittedly, have to be static, so nearly as complex as the real thing
But again, if that is part of your bootstrap base system, I guess I don't see the problem
*if the user class itself is standalone
 
@Chris But how will it actually be used? I mean, all usages will be hardcoded to User::xyz(), how can you get some other (mocked) class in there?
 
@Chris you're right. It's no more or less global than using $_SESSION. both are completely global...
 
The static user container I use for this holds a private object instance inside it, and passes calls into the object
It doesn't care what the internal instance is, as long as it implements the minimum interface
@ircmaxell So I guess that's what I am asking -- how do you feel about replacing the global session with a static class? It seems to give me more control, safer access to session data
 
user895378
@Chris It's still global. How is that an improvement?
 
@rdlowrey exactly
 
user895378
8:02 PM
In my experience, rigorous unit testing tends to answer static/global/singleton questions definitively. Once I started testing correctly, the problems with global state (even if it goes by another name) became obvious ...
 
The user state is already global
 
user895378
@Chris So it has all the problems associated with global state and therefore this is a bad thing, right?
 
You can call session_destroy() anywhere in the codebase
 
@Chris You can have a global and choose not to abuse it . . .
It's better to not have them at all, but you do what you need to.
 
I guess I'm getting at: global states are not always evil, and some are even necessary. Better to use static class structures to maintain at least some control over the state than to use something as crass as a plain global variable
 
user895378
8:05 PM
I would say global state is only necessary in the presence of suboptimal architecture. That said, it's possible that you're stuck with suboptimal architecture because you or someone else didn't know better when it was created.
 
@LeviMorrison hey!
 
user895378
If you have the opportunity for version 2.0, however, that global state should be killed with fire.
 
@JordanRichards I'll be in the other room in a moment.
 
I remain unconvinced that the active user of an application of any stripe is not already and almost always a global state -- cannot eliminate
That, I suppose, is part two of my assertion: user session is an exception to the "kill global with fire" mantra
 
user895378
8:07 PM
So how do you test code that depends on the user object in isolation? You can't.
 
In no platform or language in which a user state exists is the user state NOT global
What?
 
user895378
Because that user can be potentially modified anywhere by any code in the application.
 
@Chris Well... Yes, kill it with fire. Because not everything has a session. Not every request type does. So it's an implementation detail...
 
user895378
For your unit tests to mean anything they have to test things in isolation (unit)
 
That's already true of any platform or language. The user can log out. If your user state is not global and portions of code continue to operate in ignorance of the change in user state, you're watching a train wreck
 
8:08 PM
Hey all...
 
0
Q: TPROXY with libcurl or http:// streams under PHP

Nikolai GorchilovI have a PHP app that acts as TPROXY between users and some HTTP resources, i.e. setting the socket in transparent mode by binding to users' IPs for the outgoing connection: socket_setopt($socket, 0 /*SOL_IP*/, 19 /*IP_TRANSPARENT*/, 1); socket_bind($socket, $incoming_ip, $incoming_port); Got ...

^interesting
 
I am having issues with php opening a UNC directory...
 
the only thing that survives the globals debate somewhat unscathed, and that's cross-cutting concerns such as logging
 
Anyone have any info?
 
@ircmaxell I would still assert that any application in which the active user has any significance, the user is and should remain a global state. If there IS a user, that is as cross-cutting as it gets
 
8:10 PM
getting weird errors..
 
Your mom is a weird error
 
Warning: opendir(\\tradedata\2012_08_22,\\tradedata\2012_08_22): Access is denied. (code: 5) in C:\inetpub\RMS\controller\ViewFilesController.php on line 30

Call Stack:
    0.0002     340248   1. {main}() C:\inetpub\RMS\index.php:0
    0.0004     358280   2. include_once('C:\inetpub\RMS\smallFry\config\AppConfig.php') C:\inetpub\RMS\index.php:2
    0.0034     638296   3. SmallFry\lib\Bootstrap->__construct() C:\inetpub\RMS\smallFry\config\AppConfig.php:32
    0.0129    1046024   4. SmallFry\lib\AppController->displayPage() C:\inetpub\web_base\lib\Bootstrap.php:48
:-\
@Chris thanks...
 
@Chris disagree. I'm not saying it's really bad to make it global, but the second you do, you've opened yourself to the issues that it brings with it...
 
This is all I am doing: (starting at line 30):
         if ($handle = opendir($this->location . $date)) {

            /* This is the correct way to loop over the directory. */
            while (false !== ($entry = readdir($handle))) {
                $entries[] = $entry;
            }

            closedir($handle);
        }
:-(
 
@ircmaxell See, now I'm going to have to get into a twitter debate with you, then write a blog post about this. Look what you've done!
:)
 
@Chris You need to get a few things straight:
a) A user is not something that is global by definition. You seem to think that.
b) The term "user" is rather fuzzy. You seem to also put the actual session storage in there, which is a completely different responsibility
c) The user is not "as cross-cutting as it gets". At least not if you do separation of concerns.
 
@rdlowrey No kidding, the things I've hit that make testing difficult up to now have all been related to PHP superglobals or other global state.
 
@Chris LOL
 
Anyone use Zend_Search_Lucene with distributed storage (not the filesystem)?
 
Question: Mapping domain object(s) to DTOs - is it worthwhile to try using reflection and/or other hackery to [maybe] eliminate some of the inherent repetition, or just have two separate objects to maintain?
 
8:31 PM
@NikiC I disagree, but I'm not going to debate it in chat. I'll blog about it, then call you names on twitter. Savvy? :p
 
haha
 
@Chris make sure you hashtag with buzzwords!
 
hey
anyone good with image processing??
is it possible to decodethis apptrackr.cd/…
 
@ircmaxell The thing you refer to as "Object Global" or "Implicit Dependency" in your article, it has a name
It's called "Magic" :)
 
8:44 PM
not always, but sometimes
 
Since I can't ask this in questions since it's against the rules, can you guys give me some ideas?

Thinking of starting a new comparison website for a client. The goal of the website is to act like shopzilla.com. What is the correct way to go about this?

I am aware of amazon product api, commission junction, ebay, and google products api. Which of these to use?

Since the bottom line is to be a clone of shopzilla, how do you think they do it with what partners? Just want to know the logic/idea of it. Where do you think they get their list of products and how do they nake search results ap
 
@user1558223 Why do you want to decode that captcha?
 
because im sick of it
so anyway??
its simply redirect me to the download page, its sick!
 
. . .
 
@user1558223 The captcha isn't showing for me.
 
@ShaquinTrifonoff Does it really matter?
 
Mike i think it dose, because if it was simple captcha its possible to do with pixel to pixel
but im not sure if this will work too...
 
thanks, but i saw that before none seems close
the issue is the lines in the background
 

« first day (676 days earlier)      last day (4272 days later) »