« first day (926 days earlier)      last day (4248 days later) » 

00:00
...still bothers me ;)
@Bracketworks so... don't use loops :P
Yea, loops are overrated. I'll just proceduralize everything, calling each block in succession the number of time I think it should occur.
Related, nuts to recursion too.
@Bracketworks use a goto instead :)
@kaᵠ You think I haven't already?
lol
00:06
PHP-RFC: Line numbers for goto labeling.
100 echo 'this will be';
110 echo 'teh best.';
how about map
@igorw Nah, it uses some sort of iterative model internally.
I don't want any jmp to ever occur in any of my code ever.
Hello.
why no jmp @Bracketworks?
Cross platform compatibility for hardware architectures that don't support it.
00:09
I've got something wierd going on, maybe one of you can point me in the right direction.
Like an abacus.
c'mon jmp???
Show me an abacus that supports jmp and I'll rethink my strategy.
@crypticツ I was when you asked (for 18 hours already...)
@Bracketworks i don't even know what you're doing and why you're doing it in php if you care about abacuses
00:12
lol, I was just going to say "alright, enough being silly"
@bizzehdee I would use this flag on almost all "headers already sent" and "mysql syntax error n°1064" questions...everyday there are new ones being asked!
I've used foreach($conn->query('SELECT * FROM table') as $row) {echo var_dump($gownRow);} and everything shows up in my array twice. Once with the proper key, then again with an enumerated key. What gives?
sorry, $gownRow should be $row;
@crypticツ I love this one :)
nn all
Night, ocra.
Jocelyn, am I making some basic mistake?
00:17
@tereško maybe because I dozens of stupid mysql questions (syntax error 1064)
@KenHikage My previous answers were not to you (click the small arrow on the beginning of the line to see what I was replying to)
@Jocelyn I see. Thanks.
I couldn't find this sort of thing happening to other people, so I thought this problem would be too localized to ask as a question.
@KenHikage Sorry I had not read your code yet. I was reading the previous lines. I think you shouldn't use 'foreach' in your code.
Are you using PDO? or MySQLi?
00:36
Instead, use a 'while' loop with a call to fetch ( php.net/manual/en/pdostatement.fetch.php or fr2.php.net/mysqli_fetch_assoc)
Read the examples provided on the page
Okay, thanks.
To solve the problem of duplicated elements
Use option PDO::FETCH_ASSOC
BTW, why is it happening with foreach?
00:41
Controls how the next row will be returned to the caller. This value must be one of the PDO::FETCH_* constants, defaulting to value of PDO::ATTR_DEFAULT_FETCH_MODE (which defaults to PDO::FETCH_BOTH).
PDO::FETCH_BOTH is the default value and will cause your script to return numeric index and alphanumeric index for each record
I see. Odd choice. Thanks again.
$stmt = $conn->query('SELECT * FROM table');
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { var_dump($row); }
does it work with my code?
00:58
Yes.
foreach also works when using fetch.
odd
Ah, sorry, caught my error. Yes, your while loop works correctly, foreach acts as you said, using BOTH
Thanks again.
user652649
someone knows a perfectly working fallback for <input list=""> without jquery or any framework dependency?
does anyone have that link to that site that shows all the crazy issues with PHP?
@crypticツ phpsadness.com ?
01:06
:(

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
lol @igorw :(
so much sadness in this room =o(
PHPchatRoomSadness:(.SO
user652649
01:12
:(
somebody should register phphappiness.com
@igorw it would be hard to find content for it =o(
@igorw or phpmadness.com
how come no one has registered cv-pls.com ?
no it isn't !
while (HAPPY) echo 'Happy ! ';
01:17
17
Q: How should we handle ext/mysql deprecation in PHP questions (older included)?

HirotoThis has been talked about quite a bit in the PHP chatroom, and this comment is used to direct people to the why should i stop using mysql_* functions? question. Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Lear...

-18
Q: What's with all the PHP hate?

Wug Somebody else has to have noticed that questions that get hit by the nuclear downvote warhead are usually related, whether directly or peripherally, to PHP. I'd assert also that part of this downvote storm happens because PHP is often people's first language, and is often self-taught in early ...

1
Q: The level of PHP questions is frankly quite low, can we do something about it?

Nicola PeluchettiI'm mostly a PHP guy but it's only recently that I started looking at the PHP tag and the level of the questions is really poor. With poor I mean that, apart from answering the question, you usually have to point out SQL Injection problems and XSS problems. Can't we do a "community wiki" questi...

25
Q: Close vote seeding in PHP chat getting out of hand?

Steve RobbinsI don't mean to point fingers or cast blame on an individual, but I've noticed that PHP chat has a lot of cv-pls requests on questions that I believe are valid, to varying degrees. See here While I am all for cleaning up questions that don't belong, are off topic, etc, I worry that this cv-pls ...

I'm registering cv-pls.com I decided not to do cv-ring.com since it sounds like some medical device
4
@crypticツ cv = cardiovascular?
I was thinking more like Nuvaring
user652649
i always get astonished by conversations of the JS chat
registered! =oD
01:25
@Wes sigh
user652649
@Johann am i wrong?
no right
does anyone here perl
bothered by php question quality? 5 Minutes to Kill Yourself
@Johann lol, are you going to ask in every room?
naw @crypticツ
only in C++ and Javascript
@sehe bashed me in the lounge
and the Javascript guys just ignored me
01:28
@Johann i know some PCRE is that close enough?
sure
user652649
@Johann i like challenges. what do you need?
@Johann everyone knows that PHP means Perl Hyper Productive language
If you want to be a room owner (3 positions available) just learn perl 5 or perl 6/
only reqs for room ownership
what happened to the last 3 owners? O_0
01:30
muffled speaking
user652649
did they move to Brainfuck?
Once you go Brainfuck, you don't come back.
hehe
user652649
by the way... i was thinking to open a room about html/css.. because there isn't any serious one (read: with people in it)
@Wes Do it, I opened a CI room, shamefully
01:34
@crypticツ should I let @badgergirl be an owner?
user652649
whats CI? i can't find it
@Johann does she know Perl?
@Wes CodeIgniter =o\
@crypticツ trying to find that out
user652649
@crypticツ codeigniter? you? shhh or mad teresko will appear from behind the user list screaming out loud
user652649
:P
01:36
true story ^^
I got the RegEx room :)
@Wes let's keep it on the down low ;oP
does anyone have experience with converting PDFs into HTML with PHP? :o
@crypticツ copy is a room owner
@Johann oh nos!
01:40
well darn
2 positions left
I probably missed a lovely discussion about recent framework benchmarks. Anyone care to fill me in?
I know php2text is a thing.. but it's quite raunchy
@crypticツ When did you become a room owner? Congratulations.
Man, I've really been busy this last week.
I've missed so much in chat :]
user652649
aaaaaand there it is
user652649
01:42

HTML / CSS / WebDesign

This room is now defunct. RIP.
@LeviMorrison about a month or so ago? along with Luithasian
@LeviMorrison When Peehaa was drunk and made Lusitanian one, who then I assume maybe under alcohol too made me one. Isn't that how we all became owners? =oP
No.
lol
In any case, I support the decision.
thank you =o)
i support myself :D
01:44
It seems even Drunk @PeeHaa can still make good decisions from time to time.
@crypticツ you are a rum owner? you seem like the pirate type to me, I bet you stole that rum.
@crypticツ I don't believe I know your tie to the PHP community. What do you use PHP for?
is that required to chat here? :D i think im pretty useless
I use it to make simple websites for myself and friends. I'm about to start work on a social media site so woot woot
does anyone else find that when you exit over someone who twitter recommends for you to follow, they forever come back?
gosh.
01:46
^ didn't follow that sentence, mate.
yeah sorry. ramble. "Who to follow" on twitter is always full of people I hide
@KevinMurphy it's marketing in a sense. Hopefully you will eventually follow one of them if it's in your face enough. It's like Jehovah's witnesses, you can tell them to leave but they keep coming back, hopeing one day you will find God.
i signed my first job acceptance letter today woop
@crypticツ i suppose - i figured they had that sorted with 'promoted' users
anyways, goodnight all
nite nite
02:02
Okay, I'm back. This time my implode glue isn't echo'ing. The array doesn't have empty space.
@KenHikage sounds like you ripped a whole into the space-time continuum
I lost all the gluons....
imploded a black hole...
@KenHikage you're not allowed to implode black holes! explode if you wish, but no implode!!!
I thought it was an array of matter.
Although that matter DID look like a string of spaghetti as it approached the event horizon.
srsly, though. Anyone know why glue wouldn't echo?
@KenHikage try var_dump()
02:11
I have. It looks fine.
@KenHikage I did not know about those, thanks for this :)
@igorw lol, np
@kaᵠ array(1) { ["hue"]=> string(6) "yellow" } array(1) { ["hue"]=> string(6) "violet" } array(1) { ["hue"]=> string(3) "red" }
@kaᵠ vs. yellowvioletred
umm
paste the relevant code bit
$get = 'SELECT * FROM gown ORDER BY style_no ASC LIMIT '.$startRow_getGowns.', '.$maxRows_getGowns;
$query1 = $db->query($get);
while ($gownRow = $query1->fetch(PDO::FETCH_ASSOC)) {
// ... Dynamic HTML table ...
$get = 'SELECT * FROM gown_hues WHERE gown_id='.$gownRow['id'].' ORDER BY hue_id ASC';
$query2 = $db->query($get);
while ($gownHuesRow = $query2->fetch(PDO::FETCH_ASSOC)) {
$get = 'SELECT hue FROM hue_flag WHERE id='.$gownHuesRow['hue_id'].' ORDER BY id ASC';
$query3 = $db->query($get);
So, I'm trying to take the relavant rows of one table and input them into a cell in my HTML table as a string "hue1, hue2, etc".
by input I mean echo
damn, too tired to think, but I have a feeling you're doing it wrong
02:21
I guess.... the whole thing?
Im having a problem with the right "box" jumping down when resizing. jsfiddle.net/yTSf6/3
Well, thanks for trying guys. I've got to quit staring at this for today.
 
1 hour later…
03:45
Is there a way to determine whether any given node of a XML tree (either DOM or Simple) matches an XPath expression? Something like:
$bool = $node->canBeFoundAt($xpath);
$alwaysTrue = $node->canBeFoundAt('//*');
04:00
I'm sure this is slow as frozen garbage, but here goes:
class XmlNode extends \SimpleXMLElement {
    public function locatableAt($path, XmlNode $context = null) {
        if (is_null($context)) {
            $context = current($this->xpath('ancestor::*'));
        }
        return in_array($this, (array) $context->xpath($path));
    }
}
04:18
0
Q: Andriod ShoutCast Internet Radio FilenotFoundException

user1929491I developed Shoutcastinternet Radio Streaming in Andriod and i'm able to stream and play Successfully. But the problem is: when i execute my application,I'm able to stream and play Continuously for someextend(20min,halfanhour etc...), after that the stream is getting stoped(I'm not ableto play ...

@user1929491 what does that have to do with php?
@igorw Why create apply at all?
Oh wait, I see. Nevermind, I don't see. Why does this exist?
Would anyone like to help me here?
http://stackoverflow.com/questions/16263640/how-to-change-permalink-in-wordpress-for-a-single-category
:P
04:37
igorw, as a side note I usually create functions that take varargs but some required arguments like so:
function compose(callable $fn, $varargs = NULL) {

}
What are your thoughts about such an approach?
Which just made me curious about the following:
function compose(callable $fn, callable $varargs = NULL) {

}
oops...
why even
end($t=explode(',','1,2,3,4'));
is stricted?
I wonder if the type-hint applies. I'll have to go try it out :]
m59
m59
according to the docs, this is supposed to fail
$stmt = $dbh->prepare('bogus sql');
yet, I get object(PDOStatement)#4 (1) { ["queryString"]=> string(9) "bogus sql" }
doh, emulate prepares
Doh, of course it applies to the second element, but not any following.
Silly me.
05:00
@crypticツ WAT DO ABOUT SO STATE OF EMERGENCY
@Lusitanian advertise use of close-votes, better closing system, and more
@Lusitanian I'm hereby declaring marshal law. All man/woman for themselves!
4
@crypticツ NOOOOOOOOOOOOOOOOOO
but but @crypticツ how 'bout the 3 musketeers ?
I just watched that last night! @kaᵠ
05:02
so.. all for one and one for all better then?
one for one
@crypticツ when did you make the career move to Free Hugs Inc.?
@Lusitanian When the world turned to shit, and everyone turned on each other.
ahhhhhh
gotcha
are you the CEO there?
@Lusitanian I work in the mail-room
ahhh okay
05:07
nobody ever goes into the mail-room =o(
@crypticツ don't you worry, you'll get promoted eventually
maybe to hug-agent ?
Chief Hugging Officer?
chat is messing up for me. messages are not arriving, have to refresh page, keep getting connection errors notices, pings are not disappearing, also almost every 3 messages or so results in parse error
@crypticツ too many plugins ? TMP :))
:O
TMP Disorder
05:11
@Lusitanian it's not that time of the month
@crypticツ ohhhhh hmmm
soon there's gonna be: WD (walking), SD (speaking) and then even BD (breathing disorder)
I think I may have a case of Firefox
@crypticツ :O
@crypticツ try some Chromium treatment, heard it had good results in clinical trials
05:13
Is it covered under Obama-care?
it's open source, so yes
@crypticツ borderline, you should ask your doctor+congressman+get a lawyer :P
Ah so it's some hippie, pseudo-medicine
ohh, it's real allright, it treats Firefox better that Firefox 20 even
does Chromium have a migration/import function to copy settings, bookmarks, etc?
05:18
Oh joy
@crypticツ yes it has
Today I need to figure out how to send a mail via MS Exchange, on a computer with no internet connection
happy morning @MadaraUchiha
I'm bursting with joy
Morning @kaᵠ :P
05:19
@MadaraUchiha sounds impossible, need to compromise somehow
@kaᵠ How so?
@MadaraUchiha lolWUT
@MadaraUchiha snail mail? :P
Does WAMP usually come with PHPMailer?
05:24
Array functions are the best so I started writing as many functions as I could think of using them. One of my favorites:
function square($x) {
    return array_sum(
        array_fill(0, abs($x ?: 1), $x)
    );
}
I should put these on github so nobody else has to go through the pain of writing them.
Also, probably the best array function ever made: array_fill_keys
I use it every day at work.
05:43
How can I tell if the Microsoft Exchange has SMTP enabled?
hello!
i want to make multi level referral system. Should i go for loop into loop
What do you mean by multi level referral system?
05:58
@MadaraUchiha i mean if a user is a direct referral and the user below it is a level 2 referral
@MadaraUchiha And i want to chain it upto 10 levels. I have found some scripts and found for loop to fetch all referral for a user. Any idea
this is the script i have downloaded to get an idea of referral.
Hello all
I have a question on wordpress
I want to add keyboard navigation to my gallery. I'm using NextGen Scroll Gallery
@udaysagar i didn't use wp so far. have u read my question above?
How to enable Keyboard to my gallery??
keyboard naviagtion to my gallery??
any one here to answer please?
06:13
Thanks ka
0
Q: How to change permalink in wordpress for a single category

Prateek GuptaI'm using this permalink for all /%category%/%postname%/. Due to some reasons i want to change permalink to %post_id% for a single category and it's sub-categories. i.e. For all permalink is like this - www.example.com/categoryname/postname and i want to change permalink for "world" category a...

help plz
@PrateekGupta try on wordpress.stackexchange.com
huff ok.. :)
π and floating point precision codepad.viper-7.com/5eiTyC
i have a question in cakephp any one ready for help me?
@SumitAdak read room description =o)
@tereško you know cake ^^ ? :P
@SumitAdak don't ask for help
@SumitAdak what your question?
07:04
Having me not cv-pls is like taking crack away from an addict. So many bad questions, but must not close vote =o(
3
@kaᵠ I couldn't help casting close-votes...so many bad or unhelpful questions :-/ I'm joining the strike now
Morning
@vinaysingh you avatar is pretty different ... kind od annoying :P
morning
Morning.
9
Q: Badge in Careers profile

NullPointerBadges are like award awarded by Stack Overflow .. and it's quite good to show badges in our Careers 2.0 profile as per the image below, but only add tag badges (like php ,xml, etc.) not like marshal or copy-editor. There should be option to add any allowed 5 badges that we'd like to show off.

You may like that idea
07:12
@NullPointer dear. it is netbeans IDE
@NullPointer shoud i use any attracting actress ?
I know that ...kind of NetBeans long-long time lover :P
@NullPointer hehe, I like how you were pro-active and gave yourself a gold PHP badge in the example =oP
Lol .... and oop :p
cmon.. a question with my awesome answer was deleted from meta: meta.stackoverflow.com/questions/177583/…
Only @madara have 10k rep
However Gordon have magic mod mouse and keyboard
07:17
@NullPointer but he's the one who deleted it
@MadaraUchiha why god WHYY ??? ^^^
Else how can you see deleted post .?
After changing avatar @madara is become evil =oP
i can't see it, even if it has my answer there, i just know it
Google cached version ?
07:22
It doesn't have any answers in the cache
it's an old cache anyway
@CRYPTIC are you making website on close vote thing ? Cv-pls.com ?
mornìng
Morning
@ka ahhh I got it ,.., that was really cool answer
norming
07:24
@NullPointer mayve, I bought the domain, asking DaveRandom and Peehaa what should be done with it. May just make it the official documentation site, where it's wikied so anyone can edit/add to it
so it's strike today? Nobody clicking on the CV UI? :)
I'm clicking no cv's
would be interesting to see the cv-que go over 55k today
neither am i
not closing anything
someone should make a meta post about the strike, otherwise management won't know =oP
cv-pls.com :P
07:25
not very effective strike if the boss doesn't know >.<
@crypticツ till then, maybe mock up a fast simple explanation, like.. emm.. the contents of that gist... ?
@kaᵠ I haven't pointed the DNS to my server yet, but will do. What wiki system should I use and has anyone used OpenID to allow SE members to login to another site?
@crypticツ you had the privilege to give us the news first, so.. maybe you should tell the 'bosses' also
maybe others will follow...
Bye ...:-[
@crypticツ what wiki... CV is not 'rocket science' :P just a simple .html page will do
gone so soon @NullPointer ?
btw, where did you find a cache?
07:29
@kaᵠ wiki, so other's can edit it if things need to be changed.
I mean it'll be only a single page, but want that page to be editable
@crypticツ .htaccess file, simple privs
user652649
morning
@kaᵠ I want to use OpenID so SE members can login and edit it, I suppose I can use the API to check their rep as well so userXXXXXX won't edit it.
@crypticツ sounds cool, you'll check the rep with SE.api openId can't give you that
07:36
can OpenID give me their email hash?
hehe
not sure
dangerous line there :)
because API can get email hash so can just do lookup with hash to see who the user is so can then check that rep.
Good morning guys.
@crypticツ I wrote a script to verify if a user has over 3000 rep
@ka university final exam after 2 hour .... :-[⊙v⊙]-:
07:40
@crypticツ really, why would you do that, you sure you're not overcomplicating things?
@kaᵠ So it's limited to just SE members that can edit it?
@NullPointer good luck, break a leg, break an arm, break your neck :PPP but seriously God speed !
Is the second solution the better one or not? pastie.org/private/ofix1hj4ast0btigifg
Thankyou
@crypticツ My wiki of choice has been DokuWiki for a long time now. In case you are still searching for the right software. :)
07:42
@Duikboot First is better
There also is an OpenID plugin for DokuWiki.
Why is it better? Becauseit's more limited?
Mornings
normings
Hello,
07:51
@uınbɐɥs I disagree :-P
@DaveRandom Why?
The first avoid an unnecessary function call
If that if block had more than just a few LOC I would anyway. I hate the potential for } else { /*...*/ } else { /*...*/ } else { /*...*/ } at the end of a code block
I moved some files to another computer and git doesn't work on that repo, why? it has the .git dir inside?
In the particular use case actually I guess the if/else is better
07:54
@kaᵠ Have you got the correct SSH keys?
If you are intialising to a static value in the else then I would definitely do that first and overwrite though
@uınbɐɥs i tried git diff ar first and i'm not sure it needs the keys for that
@kaᵠ git --status output?
I have another Q: http://pastie.org/private/93n1sxugbton0ghnvoap9g
Im trying to generate a more reusable form validation class. But Im a bit stuck in returning the errors to my include file.
How can I do that the best?
Unknown option: --status
??
07:56
@kaᵠ Remove the dashes :-S
I blame monday
:)
fatal: Not a git repository (or any of the parent directories): .git
i'm actually in it
@kaᵠ In .git? Go to the parent directory
in the parent
07:59
has lots of files and dirs
I might go back to bed for a bit :-P
lol
:))
@Duikboot by deleting it completely and using filter_var($email, FILTER_VALIDATE_EMAIL)

« first day (926 days earlier)      last day (4248 days later) »