« first day (423 days earlier)      last day (4524 days later) » 

5:04 PM
Iei, this is what makes code easy to understand: p = ZEND_MM_END_MAGIC_PTR(block); [...] ((zend_mm_block*)(block))->debug.start_magic = _mem_block_start_magic; [...] memcpy(p, &_mem_block_end_magic, END_MAGIC_SIZE);
 
lol .. i take it back .. there was one person in the Fuel article who disagreed with the general consensus .. gods , and he is actually as local kid of 17 years
 
ROTFL
 
We aren't joking when we say PHP has lots of magic inside. :)
 
yeah
 
@salathe Well I don't see people laughing ether ;)
 
5:06 PM
@edorian I laugh at the PHP source regularly. :)
 
:)
 
Mostly followed by a facepalm, or head desk.
 
@salathe :D
 
@salathe i prefer headdesk , because then you cannot see the code
 
@tereško Their point no testing is interesting too. "Everything that the framework provides should be treated like php core and you don't test strpos." - "But php core doesn't modify global state" - "some functions do!" - "Yeah but you don't wrap $_SESSION or $_GET" - "Sure i do" - "Wow you waste a lot of time when you could use a framework"
 
5:08 PM
i remember when they decided to write unittests for fuelphp
 
Well, but PHP does test strpos ^^
 
lol .. it was more like "write the tests which prove that everything is fine"
 
-> off topic
in Java, 1 min ago, by Raynos
I mean I'm pretty sure the real PHP guys dont re interpret the scripts for every HTTP request. That would be horribly naive. At least I hope PHP devs do better then that :\
 
"Everything that the framework provides should be treated like php core and you don't test strpos." BS. I tested a SPL class, and you know what? I found bugs!!!
 
5:09 PM
Are PHP scripts re interpreted per HTTP request in real production environments? If they are, is it naive of me to think thats a significant inefficiency?
 
@ircmaxell php core HAS tests , why wouldn't you have tests for framework ?!
it's just sad
 
@Raynos What do you mean by interpreted?
 
@Raynos are they translated to bytecode on each request? yes, thats why you use a bytecode cache
 
PHP (in any sane setup) will cache an opcode stream (that's like java bytecode) and evaluate that
 
@tereško Well, I was writing compatibility libraries to bring things like SPLStack to 5.2. And when I was testing my version, I found a few bugs in PHP's implementations
 
5:11 PM
@Gordon is this a de-facto standard practice for PHP?
 
10:09 Rasmus said: Ilia: argh! you touched what must not be touched!
10:09 Ilia1 said: Rasmus: the e-mail regex?
10:10 Ilia1 said: all the tests were passing… I'll take a look at the bug report with the -
10:10 Rasmus said: Yeah, I guess we need to add a test
10:10 Ilia1 said: I'll take a look tonight, should be simple enough to fix
10:10 Rasmus said: that regex is at the point where any changes to it breaks something else
 
sure .. it happens
 
@Raynos among professional developers, yes. among the hordes out there, i dont know :)
 
They just don't know regex well enough ;)
 
5:12 PM
you submit a bug , and then the test describing this bug gets included in next build
 
@Raynos Yes they are in all cases
 
@Raynos Every shared hoster and everyone serving more than one page per hour kinda does it. It's included in all default packages and turned on for every installation of drupal or wordpress with their default configs. So yeah
@ircmaxell Well you should test your wrapper and that can lead you to discover bugs in the tools you use but you shouldn't write tests for core classes in your application
 
Thanks :)
 
@edorian I agree, in normal cases when you're not trying to mimic core behavior
 
Yeah
 
5:14 PM
@edorian whats a "core class" in your application?
 
@Raynos , that question makes me worry about the how java developers perceive their java-based websites to work
 
@tereško what do you mean?
 
do they really think that, because it is java, it somehow ignores the nature of web
 
@Raynos Not in my application, in the php core
 
when you send a request to the server , you do not send only "GET" parameters
 
5:16 PM
@tereško I think java developers just over engineer until they cant see HTTP anymore
 
and then they pretend that HTTP does not exist
 
If the only way to interact with your application is HTTP it's kinda broken anyways :)
@tereško To be honest I think a good php application should, for the most part (all the models behind the VC) not know of HTTP
 
thats pretty vague
 
@edorian lies
HTTP is a good IO system to use.
 
Nothing that isn't concerned with output delivery or input processing (a.k.a. the mvc stuff) should be aware of the delivery mechanism
 
5:19 PM
@edorian , if you mean that your application should not be using php's superglobals which represent the incoming data from HTTP, and instead use some abstraction , then yes , i agree
 
yeah. Pretty much that. And your "User" should not fiddle with session_start(); or $_COOKIE and so on
 
@edorian not completely true
 
wow their email regex really is really ... erm ... readable :D
 
I pass a HTTPRequest and HTTPResponse object to my controller
why abstract those away into something more generic
 
@NikiC , email-what ? you mean the filter_var()'s constant ?
 
5:21 PM
yep
 
@Raynos and your controller is part of your mvc which is your delivery mechanism which is aware of http
 
that's a regex one should definitely do DEFINE style. Or at least x it.
 
or do you mean the A3 page regexp , which it represents
 
@edorian Does this mean the controller can't touch $_GET ?
 
they SHOULD NOT
unfortunately they can
 
5:23 PM
So if the controller that handles a post method wants to get some data from $_POST how should it be done "properly" ?
 
and in controller it is not so bad .. thing is that people then to use $_GET/$_POST in the model layer
 
mc hammer always reminds me of Bill Hicks
and if you do not know who Bill Hicks is .. then i am so sorry
 
anyone know good cheap cloud computing provider in us?
 
@tereško people touching $_POST in the model get shot in the knees
 
5:28 PM
 
Bill Hicks was a terrible comedian
Go on and on about stories, political agenda, you felt nervous after watching him
he was more of an activist than a comedian
 
5:49 PM
@Raynos lol
 
Can you teach bad practice through violence? Do you think it would be effective?
 
no , it seems that "php community" teaches only bad practices
2
 
@tereško starred
 
how do you fix the spread of misinformation :\
 
@Raynos you can't
 
6:00 PM
how you minimize it
 
@Raynos how do you stop w3schools
 
@ircmaxell well .. getting it banned on google would help .. but if that fails , there is no way
 
@Neal It's wrong
@tereško exactly
 
@ircmaxell date() not Date()
 
6:03 PM
@ircmaxell DDOS ?
 
@Neal In PHP, functions and classes are both case-insensitive
 
Actually why don't we DDOS w3schools?
 
@ircmaxell This is horrible, because variable names aren't.
 
@LeviMorrison I think it's fine
but it does lead to some oddities
 
did not know that.
 
6:04 PM
@Neal
 
@ircmaxell personally, I like case-insensitivity for things, I believe it should be extended to variable names. I should not ever have $var and $Var. It's just too confusing.
 
@LeviMorrison I would argue then everything should be case sensitive. But that won't change anytime soon for BC reasons
 
@ircmaxell BC?
 
@Neal Backwards compatibility
 
6:07 PM
yes
 
@LeviMorrison ahhh chaaa. true. but people do not have to upgrade
 
@Neal uhhhhhhh
 
@ircmaxell can u stop with the 's?
 
@Neal only if there's nothing failworthy said...
 
6:25 PM
i am needing help with single sign on. I have siteA.com that requires login credentials, once you are in SiteA.com you can do many things and one of them is access another application siteB.com. If you click on the option to go to this other application, the other application also has a login screen whose credentials are the same as siteA.com, so siteA.com and siteB.com have login screens of their own with the same credentials
 
I am trying to make it a single sign on is there anyway I can remote login or pass credentials from siteA.com to siteB.com?
 
@Gordon Thanks, Gordon.
@NikiC I sent you a message on #php.doc
 
sorry, am kind of busy right now
will look in a min
could you move all your changes into a patch?
(right click in the work in progress module)
 
@NikiC submitted to patch.
 
6:36 PM
ello
you know how some sites have little easter eggs? like konami code takes you to a funny page or something?
 
@LeviMorrison thanks, that gives us a unified diff ;)
 
how do they listen for keystrokes like that? js?
 
@LeviMorrison You got lots of whitespace diffs in the patches though
 
@JMRboosties sure, why not?
 
@NikiC I hit 'correct indentation for this file'.
Sorry.
 
6:40 PM
It would be better without them, as those diffs are of importance for translation
 
Ah, right
One can probably do nothing against that ^^
 
@ircmaxell not doubting that they use JS, just have no idea where i would begin on something like that
a site which listens for keystrokes i mean
 
bind an event onKeyPress
IIRC
 
and if you wanted someone to spell like
stack
listen for s, then open listen for t, and so on
and close it if they dont spell it right
<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>
lol
pretty funny
 
6:43 PM
@JMRboosties No, just store a stack of keypresses. When you get a new one, append it to the stack, and pop the first value. Then check if the stack == 'stack'. If so, do youtr thing. If not, don't
 
@ircmaxell thanks
im new to web development so i will have to read up more on that, but the general concept makes sense
 
np
the <center> cannot hold, it is too late
tip, don't paste that line in a chat window and then switch to another tab. It will eventually eat all of your CPU
 
7:03 PM
i cant delete =(
 
lol
2000
 
@ircmaxell I think I am getting near now. For me it looks like the Zend MM is adding a header to each allocation. The smallest size that header can have is two size_t's. If those are 8 byte each that's 16byte per allocation. So if I have two allocatoins (bucket + zval) that's 32 bytes
 
@NikiC so you are still missing ~8 bytes?
 
That way I would only miss 8 bytes
Oh, yeah, what @LeviMorrison just wrote ^^
that's probably one pointer hidden somewhere ^^
 
7:16 PM
yeah, did you get the double pointer to the zval in the bucket?
 
yep
why are they doing that btw?
 
Hey guys
 
BTW, everyone, I officially have a php svn account. PHP docs, prepare to be improved! Spl exceptions, you WILL be documented!
 
I need your help, currently i'm converting second to hh:mm:ss format with the help of gmdate() function, I wonder if it's possible to remove hh: (for ex., if the given seconds<3600)??
 
7:19 PM
hola ;)
 
@epic_syntax I believe you asked this already.
 
@LeviMorrison uh, we all had that though when we got the account. but ...
 
@NikiC hrhrhr
 
I think I synced something like 200 files for DE in the first days after I got the account. But after that I only did a handful ;)
 
@NikiC lol, I loathe the SPL documentation.
If it isn't improved by February of next year.
You can say, "Told you so."
 
7:22 PM
@LeviMorrison if you mean this answer stackoverflow.com/questions/8482582/… I send digit to function, like 360
not time
 
told you so
 
7:35 PM
First patch for php documentation committed. We're on our way to better Spl documentation.
Who's website is viper-7.com?
 
Greetings esteemed colleagues.
3
I have come to you for help.
 
@JulianMoreno LOL
 
@Neal Yeah, I know, I'm a noobster.
 
@Neal Agreed :) But I might help. I'm on a mission to improve the SPL, but maybe I can spare some time.
 
@JulianMoreno whats up?
 
7:48 PM
Finally a HTML cutter:
2
Q: Wordwrap / Cut Text in HTML string

Peekyouhere what i want to do : i have a string containing HTML tags and i want to cut it using the wordwrap function excluding HTML tags. I'm stuck : public function textWrap($string, $width) { $dom = new DOMDocument(); $dom->loadHTML($string); foreach ($dom->getElementsByTagName('*...

 
@LeviMorrison Thanks. Let me see if I can explain you. My native language is Spanish, inclusively it's difficult to explain it in Spanish.
 
@hakre emmmm why do this in php?
 
@Neal What else? Is that possible with xpath?
 
@JulianMoreno Try to explain it in English, but if you can't, maybe I'll call my amigo and ask him what you are saying in Spanish.
 
@hakre lol idk.
@LeviMorrison (or use google translate :-P)
 
7:52 PM
I have index.php, page2.php and page3.php. index.php has to page2.php into an <iframe>...
 
... page2.php call to page3.php to make a login process with facebook...
 
... then, page3.php send some values bye GET that are processed by page2.php.
 
@JulianMoreno and php.net/require
 
7:55 PM
@hakre Wait, please.
 
@hakre ur getting annoying
@JulianMoreno sorry for @hakre :-D
 
I'm sorry for being not helpful. I feel ashamed.
 
But in the last process when page3.php call page2.php, I need to call index.php but page2.php processing the values sended by GET.
Is it clear?
This is the coe that has page3.php: chopapp.com/#tygfgpq
At the moment, page2.php is opened in top with the correct data, but I need to be in the index.php <iframe>.
 
wow. thats confusing...
 
I told you.
 
8:02 PM
so its not clear.
did u make an SO post abt this? @JulianMoreno
 
No because I don't knkow if I can expalin my situation clearly.
I need page3.php to call index.php sending the values by GET to page2.php.
 
why?
 
Because page2.php is in an <iframe>, and the <iframe> is in index.php.
 
why is it an iframe?
ur not answering the Q
 
Because the website is builded into JQuery by my partner, but we are also new in JQuery.
So there were some conflicts with the JQueries.
 
8:12 PM
say what?
what is jQueries?
oy...
 
@Neal Thanks for your time. I will keep searching the solution to this situation. Have a nice evenning.
 
oook.... i will be glad to help if i knew what was going on @JulianMoreno
 
@Neal Thanks ;-)
 
@JulianMoreno kk
 
8:32 PM
@LeviMorrison The people on IRC weren't nice to me :(
 
@NikiC I've been following it.
Did you try asking on #php.pecl?
They might know more.
 
@LeviMorrison You have?
@LeviMorrison Yeah :)
 
@NikiC Yeah. I'm interested in it too.
 
8:49 PM
yo
 
yo
@LeviMorrison Okay, so the plan is as follows: Write awesome patches for PHP for two yours to gain reputation among the devs. Then try and ask again :)
 
@NikiC lol
 
Or I could just pay someone to look into it.
 
@ircmaxell ?
 
8:59 PM
reading someone we just interviewed's home grown framework
 
@LeviMorrison I am really considering to pay someone for looking into this. I really want to know that and I have too much money I can't use anyways.
 
Holy SPL abuse batman!
and holy never ran parts of code
113	    /**
114	     * Returns all enumerations for the class from which this is called.  For
115	     * example, calling <code>MyEnum::values()</code> will return all MyEnum
116	     * enumerations.
117	     * @return object ArrayObject
118	     */
119	    public static function values()
120	    {
121	        $class = get_called_class();
122	        return new ArrayObject($this->_enums[$class]);
123	    }
whoops
ummmmmmmmmmmmm
 
evnin @KamilTomšík
 
thx, u2 :-)
 
@ircmaxell lol
 
9:14 PM
that's by far not the worst of it
 
@ircmaxell doing code-review? :-)
 
yup
 
for a guy we're looking to hire
 
hire me :-D
 
9:20 PM
@ircmaxell Interesting concept. Have a candidate submit code to codereview to see their handiwork. I think it could be valuable, but I know my code has some ugly stuff that I have to use because we're dependent on someone else's handiwork.
 
this was a full framework he spent the entire interview touting
 
@ircmaxell I'm not sure why he used an SplArrayObject there. It's just an array . . . lol
The only reason to use ArrayObject (in my opinion) is to extend from it. I wish it was abstract.
 
he never uses real arrays
 
Maybe he's like me and prefers $var->name over $var['name']. However, it looks like the result would actually be an array, and $var->0 looks retarded.
 
@LeviMorrison ArrayObject does not translate ['name'] to ->name by default, does it? appropriate flag has to be passed
 
9:29 PM
@KamilTomšík Correct.
 
night
 
@LeviMorrison so what's the point of $var->0? :)
 
hey all, I'm having trouble finding my mysql_config file...I've done a locate mysql_config and nothing comes back... I am currently using this server as a mysql server so I know it has an instance of mysql on it....
 
@KamilTomšík There isn't. That's abuse. But $var->name is preferable when it's supposed to be a class.
 
I guess I'm still not fully recovered from last illness... :-) I don't get why you're talking about ArrayObject when most interesting thing there is static vs. $this
 
9:32 PM
@ircmaxell Can I get the post on codereview? I'm interested.
 
@LeviMorrison what post on what codereview?
 
@ircmaxell I thought that the post I replied to was an excerpt from codereview
 
10:20 PM
no
 
@ircmaxell Neat :)
 
I was reviewing code from an interviewee
lol
 
I like it when the docs differ just slightly from what the code does at first glance but in reality does something completely different
Maybe in reality he is interviewing YOU and if you don't pick those errors up he's not interested anyways
 
@edorian With how large this framework is, I somehow doubt it
my first impression is taht it makes Zend seem slim...
 
@ircmaxell phploc? :)
 
10:48 PM
I'd appreciate it if anyone here can properly answer:
0
Q: Select the first paragraph tag not contained in within another tag using RegEx (Perl-style)

WorkmanI have this block of html: <div> <p>First, nested paragraph</p> </div> <p>First, non-nested paragraph.</p> <p>Second paragraph.</p> <p>Last paragraph.</p> I'm trying to select the first, non-nested paragraph in that block. I'm using...

I'm at work and can't.
Don't use regex is not the real answer. Maybe the question is too localized. I dunno. Do something with it.
 
11:18 PM
@LeviMorrison What if the real answer when parsing HTML is that you shouldn't use regex? :P
 
@CharlesSprayberry I agree that you shouldn't parse HTML with regex. But it does not solve his problem. That's my point :)
Give him an answer with DomDocument or the like.
 
11:34 PM
"I am pretty sure it doesn't have any errors with the exception of the fatal error killing it." Actual comment by OP in question
This made me facepalm
 
11:53 PM
Good 2am from GMT+2 everyone
 

« first day (423 days earlier)      last day (4524 days later) »