« first day (725 days earlier)      last day (4213 days later) » 

interface Object {
    get methods;
    set methods($methods);
    get properties;
    set properties($properties);
    get implements;
    set implements($implements);
    get extends;
    set extends($extends);
}
 
user895378
@LeviMorrison FYI I added ApcReflectionPool to beef up reflection caching in Auryn v0.2.0
 
ApcReflectionPool?
Must investigate.
 
user895378
@LeviMorrison It's optional, of course. You can use it or not use it. You either inject ReflectionPool or ApcReflectionPool upon instantiation of the Provider class as outlined at the top of the Basic Usage wiki section
 
@rdlowrey Do you have some basic performance comparisons?
That would be nifty.
 
user895378
@LeviMorrison Nope. I just close my eyes and push commits :)
 
user895378
hehe, but seriously, I'll do some before too long
 
lol
No worries.
Nothing I ever program in PHP would need to worry about the difference between them.
I'm just interested in performance optimizations that can be done with basically 0 changes to code.
 
user895378
It should provide a significant benefit because ...
 
6:08 PM
They are my favorite kind of optimizations because you get something from nothing, so to speak.
 
user895378
PHP's reflection API offers no way to get the string type-hint from a ReflectionParameter without actually generating a new ReflectionClass instance from the parameter. Since the Auryn API basically runs off of type-hints, caching these with APC should save a lot of cpu time spent reflecting all the type-hints. Not to mention all the other things that the library reflects.
 
user895378
But who knows. It's all conjecture without some concrete numbers, of course :)
 
It could possibly speed up an extensive test suite.
 
Well you could create yourself a CachedRflection* that is able to persist in in-memory hash tables.
 
user895378
@hakre I do that as well.
 
user895378
6:13 PM
Basically you would only need the APC driver if you were using the library in a web-application environment with very high traffic
 
posted on October 10, 2012 by Ralph Schindler

To DiC, or not to DiC: that has seemed to be the question in PHP for the last few years. Most people generally agree that injecting dependencies is the right thing to do®. For those writing a framework, or any shared codebase where extensibility or the ability to grow the codebase is a core philosophical tenet, not injecting dependencies is doing a disservice to the project in the long run.

 
user895378
Wow, @Feeds ... on-topic.
 
+1 @Feeds
 
user895378
Except I wholly disagree with statements like this:
 
user895378
> The decision of whether or not to use a Service Locator approach or use a DiC Container should be asked and answered not for your code base as a whole, but for each layer or component. The Service Locator pattern should be applied only in places where the it makes the most sense.
 
user895378
6:15 PM
The decision of whether or not to use a Service Locator approach shouldn't ever be a decision.
 
user895378
Not to mention a DIC becomes a service locator the moment you start injecting it into your classes. They're only differentiated by their use. They aren't two different types of code.
 
@rdlowrey Exactly: avoid service locators altogether.
 
user895378
 
user895378
> In short, contrary to a popular belief, Service Location is not always an anti-pattern. Patterns are not prescriptions, and service location is no exception. In some cases, using service location is beneficial, in others it is not.
 
user895378
Sounds like another Symfony apologist.
 
user895378
6:18 PM
Couldn't disagree more.
 
@rdlowrey , please do not calls it "DiC Container"
 
lol
Dependency injection container container.
 
or was that a quote from some else ?
 
user895378
quote.
 
That was a direct quote.
That's why it is funny
 
user895378
6:20 PM
And why would he say DiC ... is "Injection" somehow less important than "Dependency" and "Container"???
 
user895378
Service Locator is at best poor OOP style and at worst a maintainability nightmare. Stupid @Feeds propagating bad advice ...
 
Welcome to the PHP community where we propagate bad advice (tm).
4
 
@LeviMorrison and act offended when someone calls us out in that
 
> How many “optional dependencies” are there?
Uh . . . optional dependencies are a sign of poor design.
The answer should always be 0.
Admittedly I have one or two of these classes.
 
@ircmaxell: Nice presentation video, thanks for doing the talk.
 
6:38 PM
@hakre is the talk posted anywhere, I checked his blog and I'm guessing it's not up yet?
 
@Feeds
 
yesterday, by ircmaxell
@Nick slides are on github
 
@hakre thanks
 
I like how that guy says "In short, contrary to a popular belief, Service Location is not always an anti-pattern", without actually having any argumentation regarding that in the article.
 
@rdlowrey Yes, the facade pattern is beautiful. But it does not end when sending HTTP requests into the application ;)
 
6:42 PM
3
Q: Deleted questions and answers based on chat?

Mihai IorgaI am wondering why an user will take all my answers at a time and ask on chat to delete the whole question. Today I got 4 answers downvoted and then deleted because an user asked other users on chat to delete those questions. Is this behavior ok? I mean .. sure, it closes the question, maybe de...

fyi
 
@MikeB that guy is posting a lot of bad quality answers.
 
Stop answering crap questions and the problem will go away. — Pekka 3 mins ago
 
@hakre Yeah, he get's the rep-whoring prize of the month :)
 
@NikiC jup and the arguments are cool. I think I'll pastebin the three deleted answers, so that the time was not for nothing. duck
 
@hakre Not contesting anything, just raising the issue
 
user895378
6:52 PM
If you have ~ 1000 answers and your highest vote total is 13 ... either you write crap answers or you only answer crap questions ... maybe both.
 
@MikeB jup, not contesting anything, too ;)
 
@MikeB THAT GUY IS SO FUCKING STUPID
I'm getting angry reading his comments on Pekkas answer
He's repeating again and again that he's being targeted. People explain to him that he's not, but he just doesn't get it.
 
user895378
@NikiC lol ... life's little ironies ... like trying to call someone "stupid" but having to edit it twice to get the exact spelling correct :)
 
user895378
I do stuff like that too, don't worry.
 
@rdlowrey Obviously I don't need to remind you that a persons orthographic skills don't necessarily correlate with their intelligence ;)
 
6:55 PM
@NikiC haha some people are stubborn like that.. I'll bet you he'll wake up tomorrow and think "s&!t.. was I wrong on that one"
 
E.g. there presumably are many dyslexic people who are rather intelligent.
 
user895378
no doubt.
 
But yes, point taken :P
I also forget the !!!!11111 at the end, so that's another fault right there
 
user895378
@NikiC Hehe I wasn't criticizing, just amused because I do dumb stuff like that regularly and it's fun to watch the message update repeatedly as the person on the other end furiously hammers on the keys :)
 
@rdlowrey And the best part of it is obviously the triple ping :P
@MikeB Doubt it. He'll probably wake up thinking that evil people from PHP room are trying to steal his precious.
 
user895378
7:00 PM
I used to care about super-pings, but not anymore. I'd rather annoy someone and fix errors than have the SO chat logs put my ignorance on display for the remainder of recorded history (until we blow ourselves up and don't have the internet anymore).
 
Anyway, I'm glad that this time the first respone on meta was a reasonable one
Not like the stuff that usually happens
 
user895378
You mean instead of the usual meta response of, "OMG EVIL PHP CV-RING WHATS WRONG WITH THOSE BASTARDS SO MEAN TO EVERYONE STACK OVERFLOW == SUMMER OF LOVE!!!!!111 WRONG ANSWERS ARE OKAY AS LONG AS YOU TRY REALLY RLY HARD"?
 
s/REALLY/RLY and we're good :)
 
user895378
ah, yeah. I was close, though.
 
user895378
lol truth burn:
 
user895378
7:08 PM
@JvdBerg As almost all posts for this answer look similar, I wouldn't be surprised if you thought everyone copied yours. What's nicer is that my "answered" timestamp is from before yours, so should I make the same ignorant comment to you? — newfurniturey 5 mins ago
 
@hakre lol @ the table/column name prefix that guy is using
 
7:27 PM
I love the hate.
So humorous.
 
@PeeHaa: You're making an impression:
SO PHP Chat ... with the delv plugin .. — Mihai Iorga 1 hour ago
 
user895378
lol
 
@hakre: thanks!
I am preparing another video as we speak. An intro to cryptography...
 
@hakre I might have to release a special @MihaiIorga edition ;-)
yay. mega ping. It has been a while
 
@ircmaxell oh!
 
user895378
7:31 PM
@Mihai yeah, this is a conspiracy of high reputation users against you. That's what it must be. We're all a group of chums that meets for beer every wednesday in our country club to make fun of lower reputation users. — Pekka 50 mins ago
 
Jon Skeet's been getting on my nerves. Whadya say we target him next?
 
@rdlowrey That would be fun though. lol
 
Yeah, I just thought of a really easy way of explaining modern cryptography...
 
user895378
 
Down to encryption modes, etc...
 
7:39 PM
hi to all
anyone could you like help to me for php http issues
hi to all
hi masters
 
what issues are you having?
 
user895378
> I thought, maybe the easiest way to mock SingletonMain in SingletonA and SingletonB is by getting a reference to SingletonMain instance and performing this
 
user895378
^ Wow, possibly the most un-answerable testing question ever?
 
@rdlowrey Did I just read "mock" and "Singleton" in one sentence?
 
user895378
0
Q: Replace object with mock at the reference location in PHP

TautrimasIn PHP project I have main singleton and some other singletons that uses the main one: <?php class SingletonMain { // Main singleton // ... } class SingletonA { protected $main; function __construct() { $main = SingletonMain::getInstance(); } } class Single...

 
user895378
OMGsorz How do I test this Singleton inheritance tree????!!!!!111
 
@NikiC image src load from xml file , my issues : first page loading time the image not display but again we refresh the page, the image is displayed , why?
 
Uh, and it's even a Singleton inheritance tree
I mean, if there is anything worse than a Singleton, then it clearly is a Singleton inheritance tree...
Best served with an extensive usage of late static binding
 
user895378
The OP's understanding of testing is just so foobar'd that I can't even bother with an answer.
 
the xml file coming from some url @NikiC
 
user895378
7:46 PM
Sometimes you just hafta let the Lemmings wander off the cliff.
 
@karthys is the image URL the same between those two loads?
 
yes, the image url both are same ya
 
Did you try debugging the server response with a browser network logger of your choice?
E.g. the web console in firefox or the developer tools in chrome?
 
how to debug server response ? @NikiC
 
open the web console on your page and reload it. You'll see the http requests that went out and what response you got
So you can see what's different between the first and the second request ;)
Probably one of them returns some kind of Not Found or Forbidden or whatelse
 
7:52 PM
@MikeB it would take years to close-vote and del-vote all his contents, he is too active on Stackoverflow!
 
first time page load: i got the img src alt="name" as result of image displaying place then i refresh the page the correct image display, then both url are same , no difference @NikiC
hi to all
hi masters, anyone find solution to my issues
 
user895378
<--- Just deleted a 90Gb vncserver log file from secondary linux development box.
 
user895378
What a moron I can be sometimes. OMG! No diskspace! WTF!
 
8:07 PM
@rdlowrey Logrotate FTW!
 
user895378
Yeah, one of those things I'm capable of forgetting about when setting up an extra machine for personal use.
 
user895378
Not anymore :)
 
hehe
 
@PeeHaa hi u know php?
 
90GB of logs?
 
8:09 PM
anyone know php?
 
user895378
Apparently I somehow managed to setup the vnc server to log every pixel that was transferred back and forth when I remote-desktopped over to do stuff graphically.
 
@rdlowrey Haha, nice one
 
@karthys no, this is official chat room for Parents Helping Parents
 
ok ya @tereško
 
user895378
8:22 PM
... which is funny, because we mostly act like children.
 
@rdlowrey lolwut
 
user895378
6 mins ago, by tereško
@karthys no, this is official chat room for Parents Helping Parents
 
@Tereško go away. We were all beginners at one point. Treat people with some respect.
 
@ircmaxell It's one thing being a beginner, and another asking an obvious question
Though I do agree, @tereško you are a bit harsh.
 
8:25 PM
Either way, threre is helpful criticism and there is destructive criticism. If you are not part of a solution, you are the problem.
This room used to be helpful and forgiving. I would like to see it return to such a state...
 
user1125394
what is the first P in php for, P.. Hypertext Preprocessor
 
php
 
@cyril PHP - PHP Hypertext Preprocessor
 
user1125394
or Personal Home Page Tools (fr.wikipedia.org/wiki/PHP)
 
It is a recursive acronym now. It used to be "personal home page" but was changed a while ago...
 
8:29 PM
 
55.555
and now something to drink
 
I am sure this one is a duplicate (the problem is the quotes around the column names)
0
Q: Mysql query update

JapSeyzi have this piece of code, i can't get to work properly. require_once("../Packages/Connection.php"); $text = mysql_real_escape_string($_POST["articleText"]); $method = $_POST['method']; $articleId = $_POST['articleId']; if($method == "update") { ...

 
@ircmaxell if someone comes into PHP chat room and asks "does anyone know PHP?" there, it cannot be taken seriously.
2
 
Though I don't know how to find the older duplicates
 
8:42 PM
GENERAL: What alternative to PHP is there? I only just read this codinghorror.com/blog/2012/06/the-php-singularity.html but fail to see what consequence any such rant would have.
 
@Chris well , the article was written by Jeff , so of course you should be using ASP.NET
 
user895378
@Chris That rant is correct in some places and misguided or outright wrong in others. As for alternatives, you can program for the web in any language you like. CGI is alive and well and you could write web apps in C++ if you so desired. But no other language has managed to make the HTTP protocol as dead-simple as PHP.
 
@PeeHaa, I'd ask Lusitanian but he's not here, is this the right? github.com/Lusitanian/PHPoAuthLib/blob/master/src/OAuth/Common/… Can't find it github.com/rdlowrey/Artax/tree/master/src/Artax/Http
 
The right what?
 
8:48 PM
@PeeHaa namespace, I don't see Http/Client;
 
@Nick It's a submodule of @rdlowrey http client
he might have been changing the structure (again) ;)
 
user895378
@PeeHaa and @Lusitanian the Artax HTTP client is still under heavy development (not even v0.1.0), so make sure you keep the submodule reference at whatever commit it's currently attached to unless you want to change some of your code :)
 
@tereško Please elaborate, I am unfamiliar with his views. Do you think he is right in that respect?

@rdlowrey Alright, yeah, personally I love PHP but that may just be the result of its improper development making it easy but inefficient / somehow poorly designed
 
@PeeHaa Yeah, that's what I thought, tried using oAuthLib.
 
@rdlowrey I'm still using my old school cURL client
 
8:50 PM
@Chris , i think he is a troll that keeps whoring for page-hits because the blog has been dying
 
@Nick You can drop any http client in there
 
user895378
@PeeHaa Yeah -- probably best at the current time. I'm seriously not even at v0.1, so it's highly experimental.
 
@PeeHaa I was going to use Artax but I'm guessing it's not usable or ?
 
@tereško Hehe, alright.
 
user895378
8:51 PM
@Nick It's usable, it's just not stable at all -- i.e. I'm constantly changing the API with no regard for backwards compatibility.
 
user895378
I'm not too far away from a stable API, but I only have so many hours in the day and some of them have to be used for real work :)
 
@PeeHaa K Thanks, I'll do that
 
Looks like an easy rep one for you
If you're willing to take the time and answer it :)
 
cannot someone else take it .. im kinda listening to an audiobook and drinking beer
 
@tereško Someone already took it. Thought you might be interested.
 
9:22 PM
Am I crazy, or is this guys understanding of IoC fubar:
3
A: Using a "magical class" to avoid PHP fatal errors, good idea?

JvdBergThe 'problem' you are describing here can be solved in a number of ways. The 3 most common are: Use of a factory class. A factory class is a object generating factory. The factory itself is a static or a singleton class, globaly used within a class. Use of Dependency Injection. With this techni...

 
@LeviMorrison You're far from crazy
 
Just checking my sanity.
 
hola
 
@Lusitanian hola
 
Been away from PHP chat for nearly two weeks, wanted to make sure things didn't change while I was gone :)
 
9:25 PM
:)
 
@PeeHaa Hallo
Goedemorgen
 
morgen :P
 
I'm guessing that's totally wrong
 
It is goedemorgen UGT
 
yes --- i assumed it meant good morning
just thought i said it wrong :P
shoulda used google translate
then i would know it would be wrong
 
9:26 PM
neh. morgen is just like morning. I like it short
 
gotcha
 
@Lusitanian you missed yet another sad victim of our outrageous deleting of terrible questions: meta.stackoverflow.com/questions/149997/…
 
Hate answers like this:
4
A: Form submits even when all fields aren't filled out

kalpaitchif (empty($_POST['username']) || empty($_POST['password']) || empty($_POST['repassword']) || empty($_POST['user_firstname']) || empty($_POST['user_lastname']) ){ header('Location: register.php?msg=You did not complete all of the required fields'); }

They teach nothing.
 
We should all thank Pekka for meta.stackoverflow.com/a/150000/168606
11
 
@hakre lol didn't even notice that
@Gordon Pekka always is a nice / correct guy
 
9:35 PM
hello :)
I have mod_rewriten URLS that point subdomains to a script.php?id=subdomain
but when I access subdomain.domain.com the sessions are gone
 
@crazyname good
 
does anyone knows how to share session variables between mod_rewriten subdomains? :)
session.cookie_domain = '.domain.com' kindá doesnt works :)
 
user895378
For some reason APC never works when I install from remi-repo and I always have to make it myself.
 
@PeeHaa ohgod
 
@crazyname why do you need to do that? You are directing the user once the user requests the subdomain so there won't be much info in it anyway right? Or am I wrong?
 
9:38 PM
because when user is logged, when he access rewriten subdomain
he gets login form
 
how can a user login on subdomain when you redirect it?
 
nope
 
@PeeHaa :)
> I do not know where to begin coding this but I have an html page to sell servers
Oh really?
You are selling servers but can't code some basic stuff?
Poor, poor you.
 
9:42 PM
he's an entrepreneur, not a programmer :)
so, guys :) do you know how to pass the $_SESSIONS vars ;)
 
setting the php.ini should just work IIRC
also probably a dupe on SO
 
none of the suggestions work
thats why I write here
 
@PeeHaa Heh, don't delv it yet. Let the world see it for a while
 
@PeeHaa Crap, someone managed to answer it right before it was closed. Now we have to delete it :/
 
@NikiC and done!
 
9:47 PM
Hey guys, I didn't want to post a question about this and I was wondering if any of you had an answer
 
posted on October 10, 2012 by Michelangelo van Dam

This last weekend Manchester (UK) was buzzing PHP all over the place, because PHPNW12was held in the city center! I arrived on Thursday, a day before the tutorial day and had an opportunity to talk to a bunch of early attendees and got to meet new faces in the community. For the past 4 years I've been attending this community driven conference, seeing it grow into a professional organized even

 
you know the funny thing about meta.stackoverflow.com/questions/149997/… is, he could just have hopped into here and ask me why instead of assuming wild things on meta :)
 
@Gordon Thanks :)
@Gordon But, but, but you were targeting him!
 
should I pass variables through the parameters or use global? It gets really annoying to have to do this: something($var1, $var2)
 
@Adam184 never ever use global
 
9:50 PM
D; but then I have to write the variables out each time?
 
@NikiC :)
 
@Adam184 uhhhm yeah
 
@Gordon Imagine creating fuzz here would have highlighted more of the great questions having his great answers that help the OP.
 
something($configuration, $variable2);
 
47
A: PHP global in functions

GordonGlobals are evil This is true for the global keyword as well as everything else that reaches from a local scope to the global scope (statics, singletons, registries, constants). You do not want to use them. A function call should not have to rely on anything outside, e.g. function fn() { gl...

 
9:50 PM
that gets repetitive
thanks!
I'll check that link out
 
@Adam184 If your function needs both $configuration and $variable2 to run, it should be passed on to it every time.
 
ahh k sigh
 
Use global will mess up your code. And will allow you to run your function before required variables are set.
 
that kind of sucks
 
@Gordon well there is use of global state, however your answer is very nice ;)
 
9:52 PM
kk
 
@hakre there must be a reason why that message of you has the number 666 in it
 
Which will lead to unexpected errors and mayhem on your program.
 
thanks guys! I'm glad I didn't post a question on this, it would be closed
later!
 
@Gordon Well the days the copy-hakra was here, I actually found out that it is highly efficient to crowd-source specific type of users to find low level questions.
 
@hakre absolutely. If Mihai (and that Baba guy/gal) wouldnt be such repwhores, they wouldn't be on my radar right now. But going through their answered questions just surfaced one reason after the other for closevoting.
 
@Gordon I was a repwhore in my early days.
2
It was innocent, uneducated rep-whoring.
 
@LeviMorrison I was too. I didn't know any better. I was thinking I'm just helping people. Didn't saw the bigger picture. We've all been through that.
 
Same :o
 
Now I have a kitten for my avatar. If I were to rep-whore now it would still be innocent by nature of the kitten.
 
@Gordon I never did that :)
 

« first day (725 days earlier)      last day (4213 days later) »