« first day (391 days earlier)      last day (4779 days later) » 
00:00 - 17:0017:00 - 00:00

 
6 hours later…
05:53
@gordon kotaku.com/5858473/… Better keep an eye on your card transactions for awhile.
user50049
06:34
If you have time, there are quite a few PHP questions that have only one lingering close vote that need attention. Just viewing the question and not casting a close vote helps it decay faster, or cast additional votes as appropriate.
user50049
(10K Only, sorry. I hope that in a short time badges can help unlock /review for certain users)
07:52
@JohnP thanks for the heads up
@TimPost cool. voting now
user50049
It's kind of funny to see stuff that fell through the cracks for years. I had no idea we had so many questions (almost 18k) with lingering votes
@TimPost i'd claim at least 9k of those are my work :)
user50049
I once ventured that there were only a few thousand questions that would meet the criteria. Wow, was I off.
with that tool I am now able to cast all my closevote on a day
@salathe do you still need a pair of fresh eyes?
08:10
Greetings
hi
and bye
hi.
preg_match_all('#order=\'[0-9A-Za-z\.\/]+\'#',$string,$matches); It might not be correct but i want to fetch the matches like 'orders=all types of characters' from the $string. What is the better approach?
Seems fine to me depending on the context
@hussain what is the string format?
hi all
08:21
Hi
@edorian dude $text = 'I used to going somewhere.'; $arr = array("going" => "GNG",
"used to" => "UD"); pls look
i want my result to be I UD GNG somewhere. pls suggest me any example how'z it possibel
@SunnyRock find str_replace in the manual
@Gordon codepad.viper-7.com/TmVhFK pls look and suggest me what i am doing wrong
@SunnyRock you are overwriting the result of the first call to str_replace. Check the manual again. You can pass arrays to str_replace
08:37
@Gordon not getting pls imporve my code
Usually we don't write code for people here :)
im pulling my hair out, i have prob the simplest problem ever , but i cant figure it out.
You are assigning to $text1 two times
but only the last assign does stick
08:40
pastebin.com/h7TnCQuR ...literally only 11 lines of code, yet query failed, why god why?
@SunnyRock im sure you will understand it when thinking about it for a while.
@gordon can you help me real quick, i promise its prob the easiest prob ull solve all night and i will be forever greatful as ur servant if you do
@Gordon sorry dude but not clear yet
@ChuckKelly try to get the error with docs.php.net/manual/en/function.mysql-error.php
@SunnyRock then read the manual page again please.
there is no error , its just query failed, my connection works , im sure thats the name of my table and columns , yet it fails
is that query not valid anymore or something maybe?
08:44
@Gordon would you pls suggest me on which line i am doing wrong thing
@SunnyRock line 8. and you dont need the foreach either
@Gordon if not foreach then what is other?
@SunnyRock like I said: you can pass arrays to str_replace
> If search and replace are arrays, then str_replace() takes a value from each array and uses them to search and replace on subject. If replace has fewer values than search, then an empty string is used for the rest of replacement values. If search is an array and replace is a string, then this replacement string is used for every value of search. The converse would not make sense, though.
@ChuckKelly no idea then. sorry.
@Gordon dude i am totally new in php
@Gordon the string format is just simple string like "this is @ 5tring & can hav3 any char" sorry for late response
08:56
lol of course
@SunnyRock nothing wrong with that. but i take you are not new to english and the quoted part from the manual clearly says how you should do it.
@hussain ok. np.
@Gordon it was to proof read the php.net front page news article
@Gordon $string="my string can be like order='a2l/-_0(*'" : does this help?
@salathe was means you no longer need someone to do it?
@Gordon i want to cover any character
09:03
@Gordon yep, the article has already been published (about 5.4.0 RC1). thanks for the offer :)
@salathe re 60255: should we change "Unless the array is referenced, foreach operates on a copy of the specified array and not the array itself." to ""Unless the array values are referenced in the foreach, foreach operates on a copy of the array values and not the array value itself."
@Gordon yep, we should :)
@hussain try here gskinner.com/RegExr
@salathe does it actually operate on a copy of the array value or will it copy the entire array when the value is not referenced?
@salathe e.g. "Unless the array values are referenced, foreach operates on a copy of the specified array and not the array itself." should be sufficient and correct, right?
@Gordon as far as I know, the usual copy-on-write rules apply. so it'll work on the array value until you try to assign a new value
but no-one understands copy-on-write so best to keep it simple for this description
kwel ... its 2011.11.11 11:11 here
09:12
@salathe hmm, then it's the values
@Gordon it might be worth mentioning this in #php.pecl, just to make sure we get things 100% right
I'm a bit busy to dive into the source to check myself
@salathe will do
Hey guys, question: How should I implement my n:m database tables in my database access layer? Should I create extra classes for them?
@Gordon thanx mate the like is very useful
@sinni800 , you create a mapper for N's and for M's
09:25
@tereško But not for the table that connects the n and the m?
Ans if Domain object for N need the collection to get collection of Ms then give it that ability
@sinni800 , mappers are not made for every table, but for every domain object
@tereško Right, but I meant the classes that actually access the database. I thought mappers only use the database access classes as if they don't know what SQL is
Domain objects.. I have to figure this out better
mappers ARE the classes that access database
below them should be only MySQLi or PDO
user680786
@tereško no, below them can be gateways
user680786
to tables
09:29
@OZ But I'd rather not add another layer..
@OZ_ well .. true , but this is case of keeping it as simple as possible
user680786
@sinni800 well, it's just one another variant, optional
@OZ Sure, I agree
Alright, thank you @tereško
I keep understanding things wrong.
Oh god no, errno 150 in Mysql. My foreign keys are not sane... :/
each ID column should have an unique name , so that in each table you see that name of column , you would know exactly where did it come from
like user_id and group_id
otherwise you will just make a big mess , and create additional confusion when doing JOINs
@tereško My primary keys are like that
@tereško Will keep it in mind anyway
09:35
and does your foreign keys have the same name as the ones they refer to ?
@tereško Yes, they do
  CONSTRAINT `fk_Student_is_in_Class`
    FOREIGN KEY (`Class_ID` )
    REFERENCES `db`.`Class` (`Class_ID` )
@tereško Another question: Do the mappers for table x ALWAYS return instances of class x? Example: Class StudentMapper: getStudentsByClass, getStudentById; Class ClassMapper: getClassByStudent, getClassById
@tereško So can the Student Mapper class return return instances of "Class"?
@sinni800 , mapper does not return anything
09:50
@tereško Is that theoretical stuff or is that practical?
when calling fetch or read or restore ( whatever name you use ) , in the arguments you provide a domain object
@tereško How is that.. practical?
$user = $domain_object_factory->build('user');
$mapper = $mapper_factory->build('user');
$user->set_id( $id );
$mapper->fetch( $user );
echo $user->get_name();
this should output the name of user with some ID value you required
tel, dont ask
@tereško Well that makes you need to do everything manually pretty much. PDO has the nice fetch_class option, but it only returns NEW objects.
I'm interested though, how would getting an array of objects look?
user680786
@sinni800 and returned class violates encapsulation. is not nice
09:56
@OZ Being ALIVE violates encapsulation, right?
if you RETURN class , then you can only return one kind of class
instead of being able to use any object as long as it implements certain interface
@tereško I can just specify iSomething as a return type, so I don't see it
user680786
@sinni800 you can specify in method of mapper concrete interface or name of entity class
user680786
returned value, i mean
user680786
in phpdoc
10:02
@OZ I use that often... I really find it strange that I can't specify the return type in the function definition
I know it's PHPs nature..
@sinni800 you cannot enforce return type in php
@tereško That is exactly what I said just now
I just find it strange for a language supposedly OOP
user680786
at least we have phpdoc :)
You can still get that behaviour in every other OOP language just returning the type Object..
But whatever, PHP also ignores function definitions in that you can just put 100 parameters when the function expects only 5
@sinni800 , i find it somewhat retarded that you do not understand differences between languages with strict and loose typing
10:06
@tereško I don't know of a object oriented language that uses loose typing except for php..
javascript ... then again , i thikn you really don't know how to write proper JS
I don't even know how proper JS looks. Nobody told me
@sinni800 not true. @tereško pointed you to some resources a few days ago ;)
@Gordon The videos?
@sinni800 yes. for instance
user680786
10:13
And here some six grader comes and surpasses one
Sometimes this field depresses me, heh
@tereško The first one, yeah, but the rest I don't remember.
because you never clicked on them
@tereško I would have if I had seen them
10:21
@TimPost is there also a review page where i can cast deletion votes?
I wonder why they never even TOUCH advanced topics in vocational school for programmers
Well be back later, I have something to do..
10:41
can anybody tell me how can i make a function for password that will be same as that of wp password function ?
@Sparkx copy it?
@Gordon please this post that i posted a minute ago
0
Q: How to get wp password functionality?

SparkxI am working on core php in which i have to make work with iphone on server side. I have to call all the functionality that on site(made in wordpress) My problem is while making user login module I came to know that some internal functions+calculations are used in wp to convert password string in...

@Sparkx find out the dependencies of the function and inline them.
@Sparkx i am tempted to closevote that because the answer is obvious
really
yeah. find out what the wp function calls and copy it into your own function
hmm, You've reached the maximum of 50 Closure votes per day; come back in 13 hours so i wont closevote it
@Sparx and why do you only have 39% accept rate?
10:51
@Gordon now what is the matter of 39% ?
@Sparkx its too little. apparently you dont bother to accept answers you have been given.
@Gordon so how much is required to get the answer?
@Sparkx there is nothing required. im just pointing out that you apparently dont bother to accept answers. not accepting answers is considered rude because you are leeching help without giving anything back. accepting the most helpful answer to your question (and upvoting other helpful answers) will reward the people who spent time helping you. it will also indicate that a question is solved. having a low accept rate will make people not want to answer your problems.
ok sry if i made any mistake :(
user50049
@Gordon Not beyond the 10k tools 'delete' page, but I think they're going to be incorporating all of that soon
10:58
@TimPost good. that will make it easier to spend those votes, too :)
user50049
The only immediate feature request I'm planning is something that lets you guys stay within the review dashboard easily. So you don't have to keep popping tabs, hitting the back button and refreshing
user50049
The mod tools changed so now we can basically stay in our dashboard while working through flags, and it makes it so much easier to do
@TimPost its pretty good already i think. took me a minute to figure out that i can click "review" to inline the question, but then it gives me most of what i need.
user50049
I think he just put that back :) Let me check, may not need to make the request after all
user50049
Yay. Yes, now it's super awesome
user50049
11:02
If the same kind of vote / type / tag sort can be applied to the deletion queue, it would be mega awesome
one thing that would be helpful would be an easy way to search for duplicates when reviewing. i still have to do that manually which often makes me just click Not A Real Question in the dashboard.
user50049
Yes. If it could let us find that golden canonical answer, it would be nice
user50049
Did you have an implementation in mind for how that would work? That's a good feature request, and Waffles is looking for input
user50049
I'm finding (and closing) a lot of stuff like this:
user50049
-5
Q: error in php don't know what I am doing wrong

andy I am getting this error Warning: fopen() expects at least 2 parameters, 1 given in C:\wamp\www\fileFormProcess.php on line 19 Warning: feof(): supplied argument is not a valid stream resource in C:\wamp\www\fileFormProcess.php on line 29 Warning: fgets(): supplied argument is not a valid stream...

11:07
@TimPost i guess its difficult to have it find the golden canonical :) but i would be already happy if i could get the suggestions the user got when he entered the question. its just unbelievable how often people just ignore these.
user50049
Yeah, perhaps show/hide-able
or maybe the dashboard tools should just be an overlay to a regular question
i never used the review dashboard much in the past. i'd always look at the php tag list of questions and then pick out questions from there. but that doesnt count as reviewing. having access to the mod tools when on the question pages would be nicer in that case. basically, i dont see a difference between taking action on the page or doing it from the dashboard.
user50049
There is a similar mod overlay. Note though, if you click close -> exact duplicate, you'll get a list in the modal
user50049
So it's two clicks instead of one away
@TimPost yes, but that modal doesnt count as review, does it?
user50049
11:12
If you click close from WITHIN review, it does :)
user50049
so just expand the question, click close, select exact duplicate and you have a list of matches. If none match, you can just close the modal
@TimPost yeah, i think thats suboptimal :) basically, all of us are reviewing when we are on the question pages as well. regardless of whether we have access to the dashboard or not.
user50049
Indeed. But it's there (right now) and seemingly better than tab city
@TimPost not questioning that. i'd probably just have to change the way how i operate on SO.
user50049
I'll talk to Sam (Waffles) about it the next time he drops in, which has been pretty much every day while they work on it
user50049
11:15
Yeah, we need to get it more convenient
@TimPost maybe i write a post on meta about it
user50049
Ideally, you should not need to leave /review unless you're done reviewing for the day
user50049
Yeah, if you can think of a place to put it and describe an optimal way for it to work, please do.
@TimPost my main issue with it is that i dont consider reviewing a separate thing from just doing your usual voting and flagging.
user50049
Ahhh I understand
11:18
Upvoted	7	7
Downvoted	18	18
Edited	0	0
Commented	15	15
Voted to Close	54	54
Flagged	0	0
Deleted	0	0
Reviewed	70	70
user50049
I think they're trying to make it as much like our moderator dashboard / tools area as possible
all of these are regular activities
user50049
So you'd like an overlay that you could open if you happen to find something just during your normal use of the site?
user50049
not just specifically while in /review? We (mods) have one, so I'm sure it's possible to implement a 10k version
user50049
It's also helpful on the instances where you just have to see the whole page to figure out what's going on (coming from the dashboard)
11:23
@TimPost i think so. but im writing a question about it on meta right now
Is it possible to do this syntax somehow? $value = someFunctionThatReturnsAnArray()[4]
@Greg array dereferencing is in trunk and will be available as of 5.4
@Gordon ah nice one
not long to wait now?
@Greg i dont know the ETA. @salathe might know more.
0
Q: What is the difference between reviewing and regular activity

GordonI've noticed the Reviewing dashboard now lists stats for what I reviewed: Upvoted 7 7 Downvoted 18 18 Edited 0 0 Commented 15 15 Voted to Close 54 54 Flagged 0 0 Deleted 0 0 Reviewed 70 70 While that is all ne...

@Gordon there is no real ETA (anything can happen), there will be an RC version every 2 weeks or so until it's stable.
11:35
@Greg what @salathe said
Having array dereferencing is not a vital feature for me, so I think I'll wait until the new year to upgrade to 5.4 (at least for production)
I'm pretty certain 5.4 will not be out this year
@salathe #php.doc is a better channel for manual-related questions, but yes, that change sounds sensible. - that feels almost german. Go to another channel. We are not responsible. :D
@Gordon On irc it's "start typing name <tab complete>" that will also generate the ":"
@edorian i know. i was in SO mode when i typed it
11:39
@Gordon yeah it's LawnGnome though, he's used to telling folks they're in the wrong place (he's an op in freenode's ##php)
@salathe i dont mind it. i got the answer i needed. i just felt it was funny :)
@Gordon IRC folks can be "funny" like that :)
11:53
Ahoy hoy
12:19
mb_convert_encoding($str, "AUTO", "UTF-8"); anyone can explain what this AUTO means?
@ayublin scroll to the bottom of php.net/mbstring.supported-encodings
what do you think it means...?
@salathe @ircmaxell I have read the manual, but I tried this, and get confused going to post the snippet
well, what do you think it would do (logically)?
@ircmaxell I think it would automatically detect what encoding should be used
12:31
@salathe @ircmaxell @NikiC do you want to review my patch before I commit it?
$str = "test -1×10-";
echo $str; // echoed test -1×10-
echo mb_detect_encoding($str); // echoed UTF-8
echo mb_convert_encoding($str, "UTF-8", "UTF-8"); // echoed test -1×10-
echo mb_convert_encoding($str, "AUTO", "UTF-8"); // echoed test -1Ã10-
@ayublin Yup :-D
I gotta run, taking my niece and nephew and Sister into New York to see the Rockettes. Should be fun. So I won't be around today. Later
@ircmaxell have a nice trip :D
@salathe Please see the snippet and I am confused because: if mb_detect_encoding, detect the $str as "UTF-8", then why it's returned different string when I do mb_convert_encoding($str, "AUTO", "UTF-8");?
 
1 hour later…
14:02
@Gordon what patch?
And hi :)
@NikiC for bug 60255 but too late now. i already comitted :) and hi too
@Gordon doc patch or src patch?
@NikiC doc patch
your change is wrong btw
the "unless the array is referenced" part was right as is ;)
if you do function a(&$array) { foreach($a as $b) { ... } } it won't get copied either
So it needs only to be referenced in some way, not necessarily by as &$value
@NikiC in that case we need lots more clarification in there
14:06
we did some research on the topic with @ircmaxell
I think I'll write down what we found in a short blog post, because it's a little bit complicated
@NikiC well, I asked on PECL and was told the edit makes sense. otherwise i wouldnt have commited it
@Gordon maybe i'm wrong, but I'm pretty sure. I will recheck
btw. what is that github thing and is there any way to get my github account connected to it for the commits
14:26
Hello, do anyone know some php file (would be cool if it would be only one file), with what I can access ftp while in browser? For example I upload it on ftp server, and when I access that file, I automatically can add/delete/edit files
@Gordon that's just salathes php doc en mirror
@Y2ok most browsers implement ftp protocol
@Gordon add your php.net email address on github.com/account/email ... I think that's what is used to map to github accounts
Gordon, that is not what I need, I need something like, create new account with that ftp file and browse files, for security reasons.
@salathe done
14:35
"Fatal error: Cannot re-assign $this"
I found really hacky method to avoid this :P.
$GLOBALS['this'] = 42;
var_dump($this);
Will return 42...
I wonder if it's PHP bug...
@Gordon yay, it recognises you on github.com/salathe/phpdoc-en/commits
@salathe very nice :))
Hello, still got question about the ftp file browser on internet browser, is there any file that I could upload and create new account, so I can browse whole website files with it (add/delete/edit)
14:52
<?php
class someClass {
    public $variable = 42;
    function example() {
        $that  = 'this';
        $$that = new otherClass;

        var_dump($this);
        echo $this->variable;
    }
}

class otherClass {
    public $variable = 24;
}

$class = new SomeClass;
$class->example();
OK, I can consider myself bored...
var_dump($this) says that $this->variable is 24, but $this->variable is actually 42...
@GlitchMr interesting
@Gordon :D
15:10
Hm, I still don't get behind that foreach copying thing
I thought I understood it, but now it looks like I still did not
sports. laters
@edorian nah, that's about something else ;)
I'm currently wondering about the isref=0, refcount>1 case
I would expect it to copy and it does copy something but that something isn't the full array size
only part of it
Is there any zend certified engineer in PHP5?
yeah @ircmaxell
Gordon too
@Gordon $category->parent() vs $category->parentCategory(). Which would you prefer and why?
@Gordon: Thanks
16:33
$category->getParent()... or if you have parent already in class $category->parent...
eval($_='eval($_);');
I like abusing eval()...
I wrote my summary on foreach copying behavior: nikic.github.com/2011/11/11/…
3
2011/11/11
...
:)
hi all ^_^
16:48
Hi, @Neal
@NikiC Great read!
any doctor who fans here?
^_^
guess not :-P
$who = $doctor->who; // :P
It's PHP channel :P.
hehe. i know
@NikiC Can you please elaborate on codepad.viper-7.com/lKo0AR
16:50
anyone have a good (free) php forum library thats easy to moderate?
easy to moderate = probably some library that spam bots don't know :).
I don't see that as "proof" that only the array structure is copied and actually that showcase is really scaring the duck out of me
48 bytes
It's a proof
So I'm hoping i made a mistake. But at least i learned something
@GlitchMr :-P im making this site: docwho.co right now its just rss, but i want to expand it to a forum and maybe a wiki
16:52
RSS :P
Nice Ajax stuff
@GlitchMr yeeees.
looks crappy too lol
:P
My sites are more crappy
@GlitchMr im sure they are not lol
@NikiC My point being that i don't expect 100k zval-"pointers" to use up 9Megs
16:54
@GlitchMr haha i remember that one. that one cant be real :-P
@GlitchMr this is one of mine: blipit.net
What?
@ChristianSciberras getParent()
I like bad looking sites
But that's pretty serious, compared to that ~smith
16:58
@GlitchMr haha u want to see my original site?
Why not?
This site is still WIP
hmmm i have to find it
not sure where it was hosted lol
My testing site is on localhost
So I cannot yet give link to it.
gimme a minute
16:59
@GlitchMr i found a cheap hosting place
CAM
CAM
Hello
using the taleo API
00:00 - 17:0017:00 - 00:00

« first day (391 days earlier)      last day (4779 days later) »