« first day (804 days earlier)      last day (4135 days later) » 

11:03 AM
Holy crap!
 
@andho i have tried nothing. bcoz i didn't got anything to do.
 
Morning
@LeviMorrison The way that clicking a search result always opens in a new tab is annoying, I think. It's way too easy to end up with 500 tabs open, could it be made into a setting on my.php without too much effort?
 
11:18 AM
@MadaraUchiha Just hit F5 and it's gone ;)
 
@hakre :P
And yes, I do mean chat posts
 
@MadaraUchiha Ah, okay. Flagged :P
 
12:11 PM
morning
 
Jojo @NikiC
 
Hi all
I would like to ask a question
 
@SoulEnrapturer Please see room desciption ;-)
 
12:35 PM
> Hello Nikic,

> You do point out some very relevant points and I agree with you. Most of his comments on /r/php are not of the quality we strive to achieve. Also the majority of his post could be interrupted as advertisements for his PHPU site or his other projects.

> Where as he has not directly broken any rules I can not out right ban him at this time. I have written him a fairly strongly worded PM warning him that his post are borderline advertisements and his comments have not been very constructive as of late. I have further warned him that if that is content and comments do not imp
@ircmaxell --^
 
yup...
And that's the big flaw of reddit.
The rules don't prevent "spam"...
perhaps I will write a blog post about it...
 
@ircmaxell no
 
perhaps not
 
morning :-D
 
that would sound as if you're just bitching around because you were banned
morning @Kamil
 
12:43 PM
morning guys :)
@NikiC but he is... in a sense :)
@ircmaxell cheers :)
 
Yeah, that's true. But I'd bitch about the community itself. And how the rules aren't designed to make a good healthy community...
 
reddit sucks, be glad youre out of that
 
yup, but it's a great traffic source ;-)
 
@ircmaxell :-) I'd propose twitter as the better one, once you'll get followed by some people theres a big chance appearing in flipboard
 
12:49 PM
@KamilTomšík 1400 followers isn't some people? :-P
 
by the way, i crossed 1024 followers yesterday :)
 
nice!
 
@ircmaxell some specific people :) have a look on flipboard whos currator for appropriate sections
 
@All Do I need to know ajax for using Mathjax?Or just javascript and HTML are enough?
 
@Kamil What's that flipboard thingy?
 
12:53 PM
@NikiC its been iPhone only for a while, now its also available for android devices, its basically very easy to use internet reader :)
you setup account, define what you like and then you just swipe and read
 
Hola, guys
 
something like google reader but much better, really
 
merry christmas to y'll
 
@NikolaPetkanski r u spanish?Merry X-Mas
 
Nope, bulgarian
 
12:55 PM
@SoulEnrapturer It doesn't seem to do anything on the server side. What are you expecting ajax to do exactly?
@NikolaPetkanski Sup
 
habrahabr.ru is giving me a bunch of traffic
 
@Da
@DaveRandom, I'm fine, thanks :)
I've been reading an article by @NikiC for the scalar type hinting and got to this room. I never knew one existed on stackoverflow :)
 
@DaveRandom thanks for this clarification that ajax is a server side scripting but I thought that Mathjax uses ajax..so if I modify some mathjax code I think I 'll need it
 
apparently i completely overlooked preg_match_all flags earlier
problem solved :/
 
@DaveRandom Am I rite?
 
12:59 PM
@SoulEnrapturer ajax is not server side scripting. Ajax is used to send a request to a server, without a complete refresh of you web page
 
@DaveRandom So I don't need it
 
@SoulEnrapturer I don't think that it has anything to do with ajax, it's just a JS lib that converts markup into rendered math expressions.
I admit the name is confusing though.
@NikolaPetkanski @NikiC did anyone reach any kind of consensus on scalar type hints? I know there was an RFC but I was under the impression it had kinda stalled (again)
 
@DaveRandom Ah han I read a presentation about Mathjax which stated it does use Ajax
So i guessed i'll need it
 
@SoulEnrapturer docs.mathjax.org/en/latest/mathjax.html - I don't see any references to ajax or requirements for server side code.
 
I am making a forum that uses mathjax for placing the equations on it and I don't know ajax that's y I was confused
 
1:06 PM
@ircmaxell will you work on scalar typehints for 5.6 again?
 
@DaveRandom, dunno. I'm a bit outdated on the topic. Just read the article and came here to comment, but I see this is not current subject.
 
@NikolaPetkanski Article is a bit outdated ;) My current favorite would be type hinting using casts if there would be no loss of data and hard error otherwise
 
@NikiC 6.0
 
@ircmaxell Why 6.0?
 
I think 6.0 should be next...
 
1:08 PM
I don't think it will :D
 
@NikolaPetkanski We don't generally have a "current subject". TBH it's pretty quiet at the moment, a lot of the regulars come in here instead of doing work and a lot of people are off work today. Having said that, you seem to have poked the bear ^^ :-)
 
should and will are different thing ;-)
 
@NikiC, perhaps the only reasonable solution would be to agree on several acceptable implementations and make it configurable. Time will tell which is going to be popular :)
 
6.0 sounds like a massively-BC-breaking-release ^^
@NikolaPetkanski Ehm, no?
 
I don't think it needs to be.
and I don't think it should be
 
1:10 PM
@ircmaxell it should break all hell
 
Some BC, sure. To clean some stuff up. But not massive...
 
@NikolaPetkanski Making language features configurable has turned out to be a Very Bad Idea in the past ;)
 
okay, so a clear path for migration
like five2six
 
@NikiC, sure is :)
 
PHP nowadays tries to avoid ini settings as much as possible. And in particular for language features
 
1:11 PM
@DaveRandom hmm i see..the presentation was old...I got what I need to do thanks
 
@ircmaxell It is? Never got much traffic from there. But they do seem to have russian translations of most of my stuff
 
I've got at least 10k page views from them...
 
@DaveRandom Off work?!?!??!!?
 
From what I've seen discussed, any upcoming BC breaks are only breaking compat with stuff that people shouldn't be using anyway. Sooner the better says I.
 
What is the vote ratio needed for a PHP RFC to pass ?
 
1:15 PM
@ircmaxell you still like type-hinting? :)
 
depends on what it is...
@KamilTomšík yes
 
@PeeHaa Not me. But it seems the world shuts down for a week over Christmas
 
@PeeHaa beat me too it...
 
I hate this keyboard
 
1:16 PM
ha :)
 
@ircmaxell crockford would disagree with you :-D
 
Ha! Couldn't find it, thanks
 
@KamilTomšík Honestly, return type hints would be the icing on the cake
@KamilTomšík And I would disagree with him. Your point?
 
@ircmaxell just funny comment, I've been watching talk taken by him yesterday
 
:-P
I like contracts. And type hinting (scalar and return) makes contracts more useful
 
1:18 PM
@ircmaxell but I like duck-typing, and I basically think its not a good idea to explicitly name what your accepting
 
You like duck-typing?
 
duck-typing isn't a contract. It's a different approach...
 
not a good idea?
 
@ircmaxell I think its really either "do Ada" or duck-type
 
@ircmaxell Couldn't agree with you more. Every time I write a PHP interface I feel like 3/4 of the information I want to put in it is missing.
 
1:19 PM
I dont like contracts (over the time they've not shown enough useful)
 
Anonymous
googles duck-typing
 
@DaveRandom I've felt that way too, few years ago (I mean I really did)
 
@NikiC: My bigger push is for converting most errors to exceptions. And that won't happen in 5.x...
 
@TheCOMPLETEPHPNewbie "If it looks like a duck and quacks like a duck it's probably a duck."
 
converting errors to exceptions would be my first choice too
 
Anonymous
1:20 PM
@DaveRandom I think you forgot : Moves like a duck :))
 
@ircmaxell yes, but its more related than you might think
 
@KamilTomšík maybe you can do static analysis in your brain
 
@KamilTomšík What changed your mind?
Gah! This backspace key is in the wrong place I tell you.
 
@DaveRandom I've read Design by Contract book
 
@KamilTomšík Eih... I don't think so. One hands the validation to the engine, and the other requires you to do it. And one yields recoverable errors, and the other pure fatal errors...
 
1:22 PM
by the author of eiffel himself
 
@ircmaxell I'm not sure this would happen in 6.0 either ;)
 
@NikiC I'm not sure either. That doesn't mean it shouldn't happen
And frankly after the ext/mysql fuckup, if people cry about BC or whatever they can go home...
 
@ircmaxell And you know, with people like Stas around who have that "no-exceptions-for-control-flow" mentality (which is obviously right, but usually driven too far)...
 
@ircmaxell no, validation and design by contract are 2 different things
 
@ircmaxell I think Stas has been bitching around that exceptions shouldn't be thrown for IO operations, for example :D
 
1:24 PM
@NikiC That doesn't make him right
 
@NikiC well exceptions are exceptions, and most people use control flow where they should use exceptions
 
@KamilTomšík Yes but you still have to verify that the thing you were given really does look like a duck.
 
look at any other language that has exceptions, and they do it. We're the only one that has them and still doesn't freaking use it
 
@ircmaxell Sure it doesn't. He pretty sure is wrong. But still these kind of people in the project create even more inertia than there is anyway
 
@DaveRandom no, you dont, at all - you just tell your objects what you want to do, and they'll either do it or fail, you dont care
 
1:25 PM
@NikiC which is my point. If people aren't willing to accept switching to exceptions, but they are willing to deprecate ext/mysql, it shows me that they have no business in language design...
 
(I think what I want to say here really just is: "I don't like Stas")
 
@ircmaxell some people care about security, some people care about design
 
@NikiC seconded
@andho That's complete and total BS. ext/mysql is quite literally as secure, if not more secure than PDO
 
@ircmaxell not entirely true, smalltalk does have exceptions (theyve been invented there, actually) but you wont meet them very often and also the current trend is to replace them with callbacks
 
considering that you can safely change the charset of the connection post connection in ext/mysql, but you can't in PDO
 
1:28 PM
@KamilTomšík That's not duck typing, that's the blind leading the blind. Especially in PHP, where you can't be certain that the thing is even an object. You can't just assume it has a method or you'll get "... on a non-object" errors. And don't give me that "it's the users fault if they pass the wrong thing" crap, I don't trust anyone to do anything right, least of all PHP devs.
 
@DaveRandom i usually get that with null, so type hinting for return values won't help there
 
@andho it won't? That's what return type hints are designed to protect...
 
@ircmaxell Nobody cares about Smalltalk. I figured somebody should tell you :P
 
@ircmaxell even if a return type hint is given, the method can return null (in java it can)
 
@DaveRandom users fault? duck-typing doesnt mean you wont do input-data validation, it's about not checking method arguments, you dont check its state neither its type, thats it
 
1:30 PM
@ircmaxell You keep saying that but failing to qualify it with "for the features that they both share". Because you can't tell me that a lack of support for prepares is a good thing.
 
@DaveRandom But is the existence of prepares a good thing for the avg PHP dev?
 
@ircmaxell well there's ext/mysqli
 
Hi guys
 
@andho I wouldn't allow that in an implementation I support...
 
@DaveRandom I mean, looking at the typical PHP questions that come in nowadays, there is a clear trend of more people using PDO, but I don't actually see that they are using it right
They are just doing the same stuff they did with mysql in PDO
 
1:32 PM
I've searched all questions and answer on topic of resizing transparent png.
Here is provided solution that lot of people agreed. But I still have black background
 
@DaveRandom It's not a good thing. But to kill it with fire because it's insecure is a complete lack of understanding about why code is insecure or not...
 
@NikiC how dare you are :)
 
@NikiC Oh I know that. I just never came out and said it because I respect @KamilTomšík
 
@ircmaxell so...exception?
 
@ircmaxell Ooops, sorry. It was supposed to be a ping at @Kamil, not at you ^^
 
1:33 PM
   imagealphablending( $im, false );
   imagesavealpha( $im, true );
@Innuendo
 
clickec one too low ^^
 
@andho Exception, or a null object implementation of said interface
 
I'm not trying to defend anyone's corner here regarding the ever-prickly mysql issue, I just see a lot of people still making incomplete statements about the state of play and why x is better than y, which is exactly how we ended up in this mess in the first place.
 
@ircmaxell you dont have to :) smalltalk belongs to the same family of languages as the lisp and haskell do; I remind them because there are (still) very interesting ideas

smalltalk is not dead but I doubt its gonna make it to the mainstream, and theres at least 2 reasons for that, and I'm not gonna tell you because thats what I want to do better :)
 
...and now we've run out of fakking milk. I discover this after I have applied water to teabag. I think I should have just stayed in bed this morning.
 
@KamilTomšík If I may correct you, smalltalk belongs to the same family of languages as lisp. But lets not pull Haskell into this ;)
 
@DaveRandom: My issue was it was group-think kill it with fire without stopping to think of either 1: why it needs to be killed or 2: how is it going to effect our user base. I think killing it is the right decision in the long run. But not like this. I think more effort needs to be spent on education and spreading the message. And not just throwing errors (which will lead to nothing but pissed off users)
 
@DaveRandom Just drink coffee like real men :)
 
@NikiC haskell is nice, totally much better than lisp, but its not gonna make it, neither scala will do. javascript will remain the only mainstream functional programming language, deal with that :)
 
1:37 PM
the PHP project needs to be in the business of lowering barriers, not building them...
 
@ircmaxell The thing is though (and ftr I do kind of agree with you) said users are unlikely to end up pissed off, because those same users are the people who have error reporting turned off in dev because they think it's fixing the problem. Slightly ironically it would be more of an issue if errors -> exceptions happened.
 
@KamilTomšík Haskell won't make it mainstream, no arguing with that. But it's still the only of those languages that at least made it somewhere.
 
@PeeHaa I am British. It's congenital.
 
@DaveRandom which is the point. It doesn't do anything but make hosts mad because of the performance hit, and piss off the good devs that we have.
 
Anonymous
I asked for opinions not downvotes!!!
 
@NikiC smalltalk made it too, so the lisp did (yahoo store)
 
@TheCOMPLETEPHPNewbie downvote isn't an opinion?
6
 
@KamilTomšík lol
Good joke :D
 
@KamilTomšík how functional is javascript, and is it it's saving grace
 
@TheCOMPLETEPHPNewbie It's giving bad advice, so it deserves the downvote
 
1:41 PM
not in a long shot
 
@NikiC what do you mean by that? :) have you read hackers and painters?
 
@KamilTomšík The only thing that Lisp did for the Yahoo Store is require a rewrite :D
@KamilTomšík yes I did ^^
 
@TheCOMPLETEPHPNewbie Then stop posting stupid things. I believe we already went over the don't do escaping for output when inserting into a database thing
 
Anonymous
How is it a bad advice if the HTML tags are stored in database. How does that affect anyone
 
It is bad advise.
 
1:43 PM
@TheCOMPLETEPHPNewbie As I said. Some people in here already told you some time ago. Go read the backlog if you memory is that bad (my memeory is also pretty bad so if it wasn't you I'm sorry although I'm pretty sure it was you)
 
@NikiC so ruby did for twitter, as far as I know :) but thats not the point... it doesnt matter what projects were built with lisp/haskell/st
 
First off, never store escaped content. always escape on the way out. Otherwise if you have an issue in your escaping routine, or decide to output it to a different format you're not SOL...
Second, you're not even escaping right. You need to pass options to htmlspecialchars, namely the character set.
 
:6903916
    var factorial = Y(function (fac) {
        return function (n) {
            return n <= 2 ? n : n * fac(n - 1);
        };
    });

    var number120 = factorial(5);
 
Third, you introduce possible edge-case bugs by html escaping after running through mysql_real_escape_string
meaning that it may make certain types of SQL Injection possible where it otherwise wouldn't be...
So yes, @TheCOMPLETEPHPNewbie, it is bad advice.
 
@KamilTomšík Chat markdown sucks. It doesn't render anything in multiline messages. Also WTF is Y() about?
 
1:45 PM
@KamilTomšík what's that Y??
 
@DaveRandom Y combinator, lambda recursion
 
@KamilTomšík it's a feature in javascript?
 
@andho in the same sense as Array.remove is... you can write it yourself:
function Y(le) {
    return (function (f) {
        return f(f);
    }(function (f) {
        return le(function (x) {
            return f(f)(x);
        });
    }));
}
 
this is harmony right
 
@andho nope...
 
1:47 PM
@KamilTomšík
 
Anonymous
Thanks for the advice. mysql sucks!! or I suck !! :)
 
But Y is not memoizing, is it?
 
I may have to get a piece of paper out for that one.
 
In computing, memoization is an optimization technique used primarily to speed up computer programs by having function calls avoid repeating the calculation of results for previously processed inputs. Memoization has also been used in other contexts (and for purposes other than speed gains), such as in simple mutually recursive descent parsing in a general top-down parsing algorithm that accommodates ambiguity and left recursion in polynomial time and space. Although related to caching, memoization refers to a specific case of this optimization, distinguishing it from forms of caching su...
 
1:48 PM
@ircmaxell correct, its not
 
@KamilTomšík what about tail recursion?
i mean Tail Call Optimization
 
@andho as far as I know, no js implementation does have that
 
might it be possible to put asynchronous I/O into this
 
TBH, I wouldn't be surprised if V8 had that built in. The JIT it has is pretty sophisticated...
 
yeah i would vouch for V8
 
1:51 PM
@ircmaxell yep, V8 is totally awesome but no tail recursion, yet
 
@KamilTomšík you have a opening paranthesis after a curly brace " }( ". is that right?
@KamilTomšík as i said, you probably have a parser in your brain
 
Anonymous
I no longer think it is possible for anyone to excel in programming by taking it as a part time job. I think, it needs 100% consumption & dedication of ones time. That is what I have realized since joining SE.
 
What PHP really needs is an AST based compiler ;-)
 
@andho nope, its not :)
 
@TheCOMPLETEPHPNewbie Correct. It requires dedication
 
1:54 PM
@andho and I dont have a parser, I actually always try to think at least as possible
 
@KamilTomšík more assumptions, less checks
 
I'm out. Shower then work
 
gotta go too :)
shopping :-D
 
bye
@KamilTomšík but it worked
time to turn the lights out
goodnight
 
@andho You can declare a function and call it immediately in JS. (function() { console.log('hello world'); }()); works just fine
It's a good way to avoid littering the global object with extraneous properties
 
1:58 PM
Hello people
 
hey hey
 
Anonymous
Man, how I wish I started programming at an earlier age. I would be a genius by now
 
This is a message to the English speaking world: Will you please learn the difference between "effect" and "affect". They have similar meanings but they are not interchangeable. Many thanks.
 
Anonymous
@DaveRandom I think that has become a conventional wisdom. How about teaching us differences between repository - depository
 
2:16 PM
@TheCOMPLETEPHPNewbie That's easy enough. When you place something in a depository you place something in there that has a value but it is not important that you get the exact same thing back, as long as it is functionally equivalent. When you place something in a repository you expect to get the exact same thing back.
Like if I put £1 in a bank, when I go and get it out I probably won't get the exact same coin out, but it doesn't matter as long as what I get back has a value of £1. But if I put my file in a Github repo, I won't be impressed if my code has been altered when I take it out again, even if it does still do the same thing.
It's like references in PHP in a way - I would store a reference in a repository and a value in a depository.
 
Seems to me, that this not a first occurrence of such question
 
@Eugene Yes that can be, but then I suggest to suggest a good duplicate. Also this does not need a delv then, but first of all a close :)
 
@Eugene Too localized? I thought you had a duplicate...
 
Looking for one now.
Seems okay
7
Q: What's quicker and better to determine if an array key exists in PHP?

alexConsider these 2 examples $key = 'jim'; // example 1 if (isset($array[$key])) { doWhatIWant(); } // example 2 if (array_key_exists($key, $array)) { doWhatIWant(); } I'm interested in knowing if either of these are better. I've always used the first, but have...

@hakre waht do you think?
 
user1125394
 
user1125394
my xmas present
 
user1125394
you can code faster then
 
user1125394
2:41 PM
</spam>
 
@Eugene good pick!
 
@DaveRandom stated the obvious
 
The sky is blue.
Also, grass is green.
 
@Eugene Oh right I get what you mean. That message is auto-posted by the first person who references the question as a dupe. And it really bloody annoys me that the p of possible is not capitalised.
 
2:50 PM
@DaveRandom I think if Jeff hears about that, he will beat you to death with a capital letter ;-)
 
Hi, I am having issues with my website's loading speed.... Would someone have a second to check it out?
 
@samyb8 If your website is too slow, you're too far away from it.
 
@Jack As long as it's T I'll be happy. Being British and all.
@Jack I actually lol'd
 
Why not just update this I thought and did: stackoverflow.com/a/14071199/367456
 
@DaveRandom A double-u would be highly uncomfortable indeed.
 
2:52 PM
Some questions just deserve the "right" answers.
 
I wonder why mssql wouldn't have that function.
Would be funny if they adviced to use mysql_real_escape_string() heh
Or the only correct answer, which is to use Oracle instead.
 
3:05 PM
Question... I have a "classes" folder that who woulda thought, holds classes, classes for my Controller and Model classes to use. In your opinion, which folder do you think it would appropriately go in, "Libs" or "Models".
 
@DaveRandom You know what ... I've only just realized that I helped you with that CIDR question before lol.
 
Hi, anyone knows a good site or doc explaining about optimizing website loading speed?
 
@samyb8 yslow?
 
@samyb8 +1, I'm interested in this
 
@Jack Yeh I hate that the "count the chars in a string" approach is the best way (that I have seen) to do that so it works as everywhere as possible, it feels wrong and totally against the point of CIDR but that is the approach used in the end result (which is basically what you see here in the toCIDR() method)
 
3:12 PM
@DaveRandom Agreed .. a good uint32 handling would have prevented all of this surely.
Though only to the extent of platform support of course.
 
@Jack Yeh but I can't see that anyone runs PHP on something that doesn't understand uint32. Just like theoretically there are envs where ~0 !== -1 but in the real world you don't worry about it because they are such edge cases. But unfortunately 64 vs 32 is still a very real problem (for me, at any rate)
 
0
Q: PHP, pass array through POST

user1722791Which is the most secure way to send an array through post? foreach ($id as $array) { <input type="hidden" name="prova[]" value="<?php echo $array; ?>"/> } <input type="submit" name="submit"/> or using implode() to create a single variable, pass the variable and then use expl...

o_O
 
@samyb8 You need to identify the bottleneck. The first thing to identify is whether it is the server's connection/bandwidth. Next identify whether the server simply runs PHP very slowly. Both of these are problems for your server admin. If neither of these are the bottleneck, then start unit testing your code and benchmarking the units until you find the bottleneck. When you have found it, feel free to come back and ask us what you can do about it.
 
And made it to work
 
@rlemon ...and this surprises you because what, you had a bump on the head and forgot that is a shit magnet or something?
 
3:21 PM
Question... I have a "classes" folder that who woulda thought, holds classes, classes for my Controller and Model classes to use. In your opinion, which folder do you think it would appropriately go in, "Libs" or "Models".
 
@BrendonMcBain Don't repeat your questions, pls. We've heard you the first time.
 
idk what neal thinking while giving answer stackoverflow.com/a/14071612/1723893
 
Think instead about re-wording your question...
@NullPointer what does he ever think: answer question to get more rep
 
@Jack Then please simply answer it, it's only a 1 word answer lol
 
@BrendonMcBain It's an unanswerable question in its current form. It's ambiguous and hard to tell what you mean. Perhaps try expanding it to include an example of what you mean...
 
user1125394
3:23 PM
"Mibs"
 
@ircmaxell its ridiculous .. even i stop giving answer for rep .. after 30 days ..
 
it's the hat fever
 
s/h/tw/
 
I find it odd that this question was closed as a dup of this one, when IMHO the closed one has far better answers (even discounting mine)...
 
@KamilTomšík lol @ Y
 
3:24 PM
Hat fever is gone already, crown acquired, nothing else matters ;-)
 
@ircmaxell It's a MVC layout on my folders and wondering which folder (controllers,models or libs) a folder called "classes" would appropriately be organised in? ty.
 
I wasn't following, who got the crown?
 
@BrendonMcBain Again, odd question. Most designs don't use a classes folder.
 
And with that cryptic insult toward someone who's not even here I'm going home
 
@DaveRandom After yesterday's fiasco, he deserves it...
and later...
 
3:26 PM
@ircmaxell why not reopen and close another one .. i have voted to reopen ...
 
@ircmaxell Ohk, where would you suggest I put the classes? I decided to make that folder so all models can reach key components to my website as I was having problems sharing functions in the models with the view.
 
@ircmaxell fiasco? did i miss something juicy? ;-)
 
/me voted to reopen too
 
@BrendonMcBain Check out the concept of an autoloader. And organize your code by functionality, not by construction (the fact that it's a class should mean nothing)...
 
3:28 PM
btw, ES6 specifies TCO
 
user1125394
@ircmaxell could do a blog on functional programming no?
 
4
Q: Edit a 3 year old answer or create a new answer?

amanaP lanaC A nalP A naM AIt is well known that questions using mysql_* on Stack Overflow have been getting the canned Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this art...

@cyril Not me. I'm not that strong with it. I understand the principals, but haven't had the click moment yet...
 
@ircmaxell Autoloader hmm ok good idea. That's exactly what I created a folder to hold classes in, I put classes that have same functionality, where else can I put these for that same effect?
 
@BrendonMcBain Think of a meaningful name
 
@ircmaxell another crap edit ... he is teaching me that there is for comment .. now doen himself
 
3:30 PM
@NullPointer most HUH?
 
@BrendonMcBain For example, most libraries/frameworks have a "lib" or "src" directory at the root of the repo, then a name of the application as a directory under it, then names of "packages" (of related functionality) under it...
 
@ircmaxell Well, I think UI would be suitable as those classes that will be in the now called "classes" folder will be associated with my view output. Sounds ok?
 
@NullPointer
I hate the editing system... Editing posts for content is bad. Editing to fix formatting, add links, etc is fine. But adding in explanation is horrible.
time for a meta post...
@BrendonMcBain Why not call them "view" then?
 
0
A: Edit a 3 year old answer or create a new answer?

NullPointerIt completely invalid like this to edit what you need to ask to op to do this as in you this answer

 
3:35 PM
@ircmaxell Wanted a more original name but I guess that will do
 
/me needs to book airfare for sunshinephp
 
@ircmaxell Do you think "components" would be appropriate also?
 
@BrendonMcBain There are only 2 hard problems in computer science: Cache Invalidation, Naming Things and Off-By-One Errors...
 
lol
doh, ran out of close votes
 
3:48 PM
Why in the world is PHP so popular? I really don't get it. Not trolling. Just curious.
 
@ircmaxell :P hahaha ok
@Chimera It's easy to start out with probably thats why
 
43
A: Why is PHP apt for high-traffic websites?

ircmaxellWhat you'll usually find is that it's not as slow as you think. The reason a lot of sites are slow is because the hosts are overloaded. But one primary benefit of PHP over a compiled language is ease of maintenance. Because PHP is designed from the ground up for HTTP traffic, there's less to b...

 
hello guise
does anyone are good with c++/cli here
 
Oh hi Cicada
 
@NolwennLeGuen Check out the C++ room. This is the PHP room

Lounge<C++>

Today we're daydreaming about C++26 reflection
 
3:50 PM
tk u byut they dont cli
only c++
 
@ircmaxell +1
 
but if u dont want to help thats also ok
 
@BrendonMcBain It's a joke, but it's serious as well. Naming is one of the hardest things to do. I wouldn't worry too much about it. Just pick something you think fits, and then over time ask yourself "does it still fit and make sense" and if not, change it
 
@ircmaxell ohh, I thought you were mocking me, I'm gonna go with components, the google definitions explains the containing classes good. thanks for the replies, cya later.
 
yey ... got 10 follower of my proposal in 1 day
 
3:52 PM
so how can i use my php classes from c++?
 
@ircmaxell about facebook... seen the hhvm thingie?
 
@BrendonMcBain No, definitely not mocking.
@FlorianMargaine Yes. But that's not PHP. It's similar, but it removes all of the dynamic features of the language. Making it only php-like... A fine difference, but a definite one...
 
oh? I thought it was a JIT for real php
 
Is anyone reading the interviews on 7php? (7php.com)
 
i read them on 4chan
 
3:54 PM
@NikiC Not really. I've read one or two, and wasn't overly impressed. I prefer the elephant interviews
 
@ircmaxell Got a link to that?
 
user1125394
@Chimera me too , but there are bright people here putting work on php, trying to make it better
 
@cyril agreed.
 

« first day (804 days earlier)      last day (4135 days later) »