« first day (1357 days earlier)      last day (3816 days later) » 

00:00
:P
@Danack Motivational quotes linked with alcohol?
 
2 hours later…
02:07
in Lounge<C++>, 8 hours ago, by Ty221
I thought the chat has been ccreated to get instant and fast help
02:26
eloooooooooooo is meeeeeeeeee
 
1 hour later…
03:56
helo
hello every one
people i have an idea for php but i am not sure if it can be done in php
what else it need the idea no one do it before so it is frist time
@isslamakkilah ..?
i mean idea i got are not in the web and i need to make sure php can be effective
@isslamakkilah Nobody can help you without the idea...
03:59
of curse
sure let me look for links to better understanding
see this site they are they are looking for some one to translate there midea everywhere
now i wont suggest people anymore to use prepared query ... :D
@isslamakkilah ...?
and what happen is they give the midea for some one and he have to the Watch the movie or what ever and use this application aegisub.org
to Translates movie
now my idea is to make a website commite for translator they loging and select what ever they wanna to translate and they will get 50 cell(each cell is a is in english for example) Usually it is 1300 for the movie and each one in the site will have the same and also there is account for people who check if the translation is right
@jeremy what do you think
04:14
@isslamakkilah You probably can't just do that with PHP
what else
hellow everyone i was wondering if you guys could help me a query im using pdo and for some reason i cant get the bindings variable correct im using a mysql LIKE cause and for bindings i dont know how to add the percent signs on the front and end of variable can you guys please help me
$select_reposts = regular_query("SELECT * FROM t_board WHERE photo_name LIKE :name ORDER BY id ASC LIMIT 1", ['name' => '%$file%'], $conn);
@jeremy what do you think i am going to need
@isslamakkilah It's a big project... I'm not a consultant, I wouldn't know.
You'll need a lot of develeopers
hhhhh that is right
but what else do you think like java applte
do you think
04:20
3 mins ago, by Jeremy
@isslamakkilah It's a big project... I'm not a consultant, I wouldn't know.
where i can go to find answer maybe some one can help
@isslamakkilah Find a consultant agency... you'll need to invest a lot of $ and it seems like you dont have the capital :\
go into the java chat @isslamakkilah
ok brothers i love you all see you
anyone? i need help lol
nvm i got it figured out
05:18
Good morning
 
2 hours later…
07:00
morning all
@SecondRikudo fillers :(
07:47
monring
good morning room
Murrrrning :3
CSS guys, I really need your help (:
if someone good in CSS willing to assist, then ping me (:
08:03
moin
mornings
morning
Morning.
> Dear sir/madam
I just lol'ed when I saw mail starting with that. ^
The main reason why I hate e-commerces is that at some point they force you to save serialized data in database.
rebeccanings
Finally, I've implemented type-hinting for PHP without all bad things which are in previous RFC's. You can check the fiddle for it!
damn it ...
@AlmaDo /me looks with angry face
@AlmaDo :)
since I have troubles with CSS and I'm sad, I wanted to share my sad with you (:
So, the question: what should I write to "CSS" part here so "options" (elements with grey background) will be at their places, but rest document would be behind them? (so they should overlap the rest text & elements). I've played with position and/or z-index, but no success.
Star the above ^^
@AlmaDo option tag needs to be closed
Before Madara gets here and is all boring :P
08:38
@Leri bah, ignore original dropdowns (: they're just to show origin
15 mins ago, by Alma Do
Finally, I've implemented type-hinting for PHP without all bad things which are in previous RFC's. You can check the fiddle for it!
LOL
@AlmaDo So, overall effect would be that your generated elements are placed on top of the <select>?
@AlmaDo Well, my css skills are negative so I tried to be as helpful as I could. :/
@DaveRandom huh. ignore "select" (dropdowns). They are just to show from where I've got the data. In fact, those dropdowns will be hidden. The goal is - to emulate situation, when dropdown options are shown (so with pure dropdown those options lists are at the top of view - overlapping all elements behind them)
@Leri yeah. It's just .. pain. I even don't know how to google it properly
I suspect z-index has something to do with it, but I've not succeeded with usage of it..
08:43
@AlmaDo Oh, so you mean like jsfiddle.net/w5xDB/2 ?
@DaveRandom yay. that's it. hm.. I'm lost why it didn't work for me (I've tried absolute positioning)
got it.. "position: asbolute" .. my bad..
@AlmaDo You were doing it on the options and not the container, at a guess
oh rite lol :-P
Damnit
@DaveRandom thanks
08:53
btw, have you made any improvements on the dropdown exercise ?
@tereško I'm doing it
hell knows why, but I'm still working on it.. reading tons of manuals :p
I've thrown my old code away and writing it from scratch now. Looks better
the "why" is same reason why you tell someone who learns PHP to make a blog as the first exercise - you will understand what the expected end result is
well, no. I mean following thing - usually, if the exercise has use-case, I like to do it. But this exercise hasn't real use-case because there are thousands of good implementations. Yet in same time - somehow I want to accomplish it
btw , have you actually found any good implementations /
or are you just assuming that there should be some
^ second statement
09:18
mornings. I'm working with some PDO again, if someone has some better practice and knowledge (I'm relatively new to it), I just had this question: stackoverflow.com/questions/24570784/… (pdo + mysql in sepcific) about memory and statement management.
ah and happy friday ;D
+1 for happy friday
Morning (sort of)
you are getting worse by the day :p
yeah it's not really morning any longer :)
but sort of it is ^^
Hi friends,
Is it possible coding Macros in Excel using PHP?
what? You can program nuclear missiles using PHP what is Excel?
@iroegbu Sometimes, it's just better to say "No"
It's "No" for not possible and if I'm wrong - "No" for you should not do it
Don't do it, don't do it, you fool, you fool.
09:33
Even if the answer is more likely "Yes you can, no you shouldn't"
Is google down?
@PeeHaa :-D
nice joke
It's an honest question
09:34
no, it's just we don't use it any longer because of NSA :D
UK Google is 500ing
for me
I get a 500 :|
@ircmaxell fix it fix it fix it! :P
;-)
In my application I am performing Transliteration of Arabic to English. On web page I did it, so that when user enters any character it gets trasliterated instantly to other language.

Now I wanted to do it for excel,
when user write text in one cell, it's converted text should appear in neighborhood cell
: )
@Naruto No, actually. All canon.
09:36
hehe neighbourhood cell
I am newer in here. How can I check online user here?
active looking images @Sadikhasan top right
@hakre so... pdo_mysql_stmt_dtor() does the same thing as pdo_mysql_stmt_cursor_closer(), so as long as the statement object is either explicitly unset or goes out of scope before the next thing is executed, it shouldn't make any difference. That said, I'd still prefer to do it explicitly
Also that only applies to PDO_mysql, I've not looked into other drivers
@GotalovePHP some images visibility is low and some visibility high
09:39
@DaveRandom Yes, but I somewhat hate this "to be on the safe side" and then pumping method calls onto objects as this is so bloaty and doesn't help to defeat madness :/
high active
@GotalovePHP ok thanks
kul @Sadikhasan
is there a way to see the size of a stream without loading the contents into memory as a string?
@DaveRandom I'm always a bit wondering if destructors are really called when the variable goes out of scope (single instance naturally).
09:40
@hakre For me it's just good habits. You don't make a mess without cleaning it up, it's rude.
:-P
But from a purely technical standpoint, you don't need to close the cursor explicitly in that scenario
Is it just me or did the chat search became worse as of late?
@DaveRandom question of responsibility: it's rude if the object wouldn't take care of what it encapsulated.
I getting Error 400 Bad request when I use PHP CURL
don't shout, got headache ..
@nikic, @bwoebi, @JoeWatkins care to answer this?
18 hours ago, by PeeHaa
http://stackoverflow.com/q/24557958/508666
09:42
@hakre The database connection has implicit global (or at least, shared) state. By using a statement, you are affecting that state. Therefore you should explicitly leave it how you found it
it's free'd when 0 reached
well
it depends what you suppose free means
@DaveRandom sure: create statement variable, unset it (implicitly as the scope is left).
@hakre I suppose that's fair
@DaveRandom it's basically the bottom line of that question. I just don't know if I can trust PHP that much ;)
09:47
@hakre Actually what @PeeHaa / @JoeWatkins are discussing is quite closely related. What I do know is that an object's dtor will always be called when the object is destroyed, the question is whether you have to wait for GC to do it or whether it will happen when the stack is popped.
I think the word "free" is right if we are talking about Zend, the memory used is free'd for use by zend again, but it's not freed in the real sense of the word, zend never actually free's memory allocated by it's manager (that's to say, non-persistent memory) ...
@JoeWatkins never?
What does that mean @JoeWatkins?
That sounds like a leak to me?
no, it cannot
this is how zend allocates memory, it requests from the system by whatever means memory in segments, since syscalls to free/malloc incur global locking and other strangeness, most complex systems written in C include their own allocator ...
so when you call free, the memory is put into a "free list", available for use by subsequent calls to emalloc, but is not actually free'd in the real sense ...
That made absolutely no sense to me :') Glad I dont' do C
09:57
@JoeWatkins OK so here's something I have previously wondered that seems to contradict that: when you run a very long running PHP process on Windows, it starts up and you get a sizable-ish chunk of memory used, a few MBs. When you leave the process running for "ages" (not sure how long in practice) the process is using a lot less (often <1MB). How can that be if nothing ever gets free'd?
Yes ages. WS
there are two times syscalls to free might be made, one of them explains that ...
one is shutdown
@DaveRandom Yeah, same for me. I know that GC must not kick in immediately. But perhaps some internal objects are able to mark themselves for strict clean?
partway at least ... lxr.php.net/xref/PHP_5_5/Zend/zend_alloc.c#zend_mm_del_segment wil unlink whole segments in some cases where free is called on first block that isn't guard ...
I guess this can only really happen for long running processes, and I wouldn't have expected it ...
0
A: How does PHP's 'unset' construct work internally?

bwoebiTL;DR Both statements are true. Let me explain. (It's true since at least PHP 5.0 (before, I don't know). There comes phpng now, which does fundamental changes, but this principle is still used.) The cirular garbage collector The circular garbage collector is just used for circular referenc...

10:11
aww guys, it's ok what i can write 'print ohmygod;' (w/o quotes) and it will work w/o errors and print 'omygod' ?
@JoeWatkins that just hold true as long as we don't use USE_ZEND_ALLOC=0 (or however that env var is called…).
@Abyss doesn't work without notices…
morning
@Abyss Enable error reporting for dev environment. :)
@Abyss That's expected behaviour, it's also a bad idea. If it's a string, quote it.
@Leri yep, anyway it's printed, noticed about non-assumed constant, but printed as string
10:15
> We have them usually when the one objects properties are assigned one other object and vice-versa.
@bwoebi WAT!? ^ :P
@PeeHaa what's the problem?
Sounds like a builder..
@bwoebi E_NOT_ENGLISH
@PeeHaa something is assigned something else… where's the problem?
"We have them usually when the one objects properties" What the one objects?
How is one objects properties assigned one other object?
10:19
$a->b = $c, $a and $c being objects?
> We have them usually when two objects contain references to each other.
@DaveRandom meh, better English… but I still don't get what's wrong with mine
I for one had a hard time understanding what was baing said so there is that :)
Not arguing who's fault that is ;)
But, yeah, my head is too polarized to German ^^
/me just realized I don't have to work today, after working, for half the day ...
10:27
btw @PeeHaa did you get your ticket yet?
@JoeWatkins why not?
@DaveRandom Nope. I will shoot and email over to them later today
I guess it was sent to the wrong emailaddress
@PeeHaa Even if they can just tell you what email it was sent to :-P
I think it has been sent to the one emailaddress i don't have anymore :P
11:04
@tereško third iteration: jsfiddle.net/7hBxY (it seems I've done better, but still there are problems)..
window.onload = function() is pointless
@tereško hm.. ?
if JS is placed at the bottom of the document (before the closing </body> tag), then it will be called when DOM has finished loading, but hasn't yet finished drawing
wrap your code in an anonymous function to isolate it from extrernal global state
@bwoebi independence day, employed by US company ...
@tereško oh, I see. direct call
user924016
11:11
Hmm.. my router is acting stranly.. whenever I connect a third pc the pc gets a assigned a "U.s. Department of State" ip with a limited connection.. =/
well.. is there any chance that this code looks better ? :D
@RonniSkansing nsa
user924016
well it is pretty annoying =]
Big brother is watching on you
@AlmaDo so , the current verdict is: code is a lot better, but now you could focus on turning it into a component
11:15
@tereško ok, I have some questions
you should now watch this lecture:
@AlmaDo shoot
I've heard (where - I don't remember) that operating on HTMLCollection is dangerous (and I'm doing it via adding prototype). Is that so? If yes - why?
@JoeWatkins ah, lol
@JoeWatkins can you look into that compile bug with libedit/libreadline in phpdbg then?
@tereško yay, something good to watch! I've been looking for some good videos
@bwoebi yeah, I have a list, and that's on it ... might get to it ...
11:17
@AlmaDo because HTMLCollection is dynamic. If you create a collection of DIVs, then if you add another DIV to your document, it will magically end up in that list
@tereško yes! exactly why I'm working with arrays+map. I've spent ~1 hour figuring out how the hell my items are changing inside for loop itself
that also applies to .lenght, because in a HTML collection it is not a fixed variable
so, .toArray() method (turn collection into array with saving state on method's call time) is ok?
@JoeWatkins The is the only thing that we need before PHP 5.6
and then there is the minor thing of HTML collection being up to 20x slower
@AlmaDo yes
11:19
fine, so it's a good decision after all
I've just didn't know how to resolve that issue another way
ok, I'll check the video. Thanks, @tereško
@AlmaDo converting to an array is actually the recommended solution
@tereško I've faced that strange (now I see it;s intended) behavior when I was changing classes of options one by one. And I always was able to switch only half of them (obviously, because another half was changed by loop itself)
and second question
(back to original issue) - you've asked me to implement that replacer in return to the question "what are use-cases & advantages of nested closures in js". So.. why this case is an answer to that question? I can't see where I've used them so much in my code..
.. which is why I linked you to that lecture now
at first you needed to get to a code, which does not cause kittens to bleed
11:25
good. So I've saved some kittens. today is a good day
lol
12:07
can connect BigCommerce api with multiple stores for one product using php please any buddy help me ?
on a completely unrelated note, self-condition, in order to induce a pavlovian reaction is kinda awesome
@AnakbhaiGida have a point?
.. or maybe a comma?
I was going to go with "I'm not your buddy, guy"
^ s/uy/ay
@bwoebi what happens when a variable's scope ends? does this unset or different? and is the destructor of an object called on unset or on garbage collection?
just to make sure
foreach (someFunction() as $val) {}
someFunction() is only called once, right?
12:21
I don't think so
ThW
ThW
@FlorianMargaine yes
If you do for ($i = 1; $i < count($array); $i++) { } it's executing the count each time
Why is function different?
@Jimbo No it isn't, and that makes no sense
ThW
ThW
@Jimbo foreach on an integer?
12:22
Updated to for
:-)
@Jimbo because: 1. foreach has nothing to do with for; 2. it's first statement, not second
So you're saying that if I did for ($i = 0; $i < funcThatReturnsInt(); $i++) { } it would only do the function once?
@Jimbo again, it's not the same
@Jimbo No, the point is that for != foreach
ThW
ThW
@Jimbo That is not foreach()
Fair enough, I was presuming that loops in PHP are somehow similar :-)
while ($cond) is the same as for (;$cond;), foreach is a totally different animal
Ah, fair enough
12:42
@PeeHaa SCHLAND!!!!1eleven
@DaveRandom I think on this day some years ago some rednecks decided to flip the bird to England. Don't you guys celebrate this somehow?
Good riddance or something?
So you're saying "Good Riddance Day" needs to be a thing?
It'd already have a theme song.
@LeviMorrison not this one? youtube.com/watch?v=N0fY5GoSMdQ
@LeviMorrison they just say "happy fucking treason day"
4
12:56
haha
13:11
I have this feeling PhpStorm ignore everything under 'Code Style'
@DaveRandom for ($it->reset(); $it->valid(); $v = $it->next(), $k = $it->key()) is almost the same-ish.
Actually, you'd need $it->reset(), $v = $it->current(), $k = $it->key() in the initializer.
@LeviMorrison "flip the bird"?
@DaveRandom Give the finger.
We don't really celebrate anything to do with the old empire, mostly because we're ashamed I think (as indeed we should be)
user1804599
@DanLugg doesn’t work with arrays. :D
13:16
@rightfold Well, it would if I had my way.
;-)
@DaveRandom That's quite admirable of you chaps.
I want to fix DateTimeImmutable::modify()'s description from "Like DateTime::modify() but works with DateTimeImmutable." to something that makes it absolultely clear that the calling object is not changed [it wouldn't be immutable if it was changed!], but concisely. I thought along the lines of "Like DateTime::modify(), but returns a new instance of DateTimeImmutable with the modified date and time. The calling object is not altered." But I'm not happy with it.... thoughts? :)
Just remove datetimeimmutable
(P.S. Similar changes will have to be made for all of the other methods that "appear" to modify the object)
@LeviMorrison +1
13:24
@LeviMorrison I'll have to be removed from php-src first, before we can kill the docs. :)
I can't believe he was allowed to just commit it.
No real peer review, no testing, nothing... just commit because the idea was okay.
@JoeWatkins @Levi mentioned that there's some issue with the return typehints implementation. Do you need any help with that?
DateTime should have been immutable in the first place (imo), I don't see the problem with adding an immutable class alongside it.
The act of committing isn't so much a problem, but the lack of reviewing, discussion, changing after that, is. Unfortunately, it means bad things get added into a release, then can't be changed/removed for BC reasons.
Well, at least we didn't end up with DateTimeImmutable extends DateTime...
5
13:27
Removing DTI could be classed as a bug fix, though. :D
Derick concessed us that much...
Yeah, and we got an awesome interface that literally no-one will ever use.
:)
> If you do not understand why someone would want to hide the sausage making, and you enjoy eating sausage, never, ever, watch sausages being made, read "The Jungle", or otherwise try to expose yourself to any part of the sausage making process. You will lead a much tastier (and perhaps shorter) life in your blissful ignorance.
@LeviMorrison no, just remove DateTime ;)
13:33
@Gordon and rename DateTimeImmutable to DateTime? sounds reasonable.
@NikiC Given that all sane code would use DateTime as if it was immutable anyway, yeah, why not.
I would say write an RFC for it but seeing as it never had one just commit it.
^^ lol
@hakre i_zval_ptr_dtor() is called. The same helper function ZEND_UNSET_* uses too.
@LeviMorrison :D
13:39
but tbh, I dont have a problem with DateTimeImmutable::modify. I agree that it seems counterintuitive at first glance, but its not rocket science to understand. The class says immutable, so if you spend two seconds thinking about it, it should be obvious that it returns a new instance.
There are no words to describe this. http://www.php.net/manual/en/datetimeimmutable.modify.php
^^ what prompted me wanting to "fix" the docs.
@Gordon I agree that it should have been called DateTimeImmutable::mutate()
@salathe since when do we fix things for people doing Ruby?
@Gordon We haven't, yet. :)
@salathe Granted, it says Ruby and not RoR, but technically those folks broke teh interweb.
13:50
$query = "INSERT INTO users SET first_name = ?, last_name = ?, email = ?, password = ?";

$stmt->bindParam(1, $_POST['first_name']);
$stmt->bindParam(2, $_POST['last_name']);
$stmt->bindParam(3, $_POST['email']);
$stmt->bindParam(4, $password);
I've looked at the manual, it says to do this; yet this wont work.
Well, I will be at PHPNW once again this year...
Congrats.
@ircmaxell looking forward to meeting you there, I got accepted as well \ó/
You have to be accepted?
I won't. Missed the CfP
13:53
Whats the requirement?
@RahulKhosla to give a talk, yes.
You're giving a talk?
indeed :D
13:54
Good luck.
thanks, I'll need it. :)
Can someone help with ^ my question? :D
@RahulKhosla you left out a few lines in the middle there, didn't you?
@TobiasGies You'l be fine, just move around on the stage etc, watch some talks too :P
        $stmt = $db->prepare($query);
what's $db? a PDO or mysqli object?
13:56
PDO
I whussed out on giving a talk. Maybe next time ;)
Hey @RahulKhosla
Fatal error: Not working in /path/to/broken/script.php on line 387

Call Stack:
    0.0000     163816   1. {main}() /path/to/broken/script.php:0
    0.0156     169680   2. some() /path/to/broken/script.php:152
    0.0156     169928   4. broken() /path/to/broken/script.php:94
    0.0156     170176   6. function() /path/to/broken/script.php:121
@LeonLotus Hi :)
13:58
@RahulKhosla what's the error message you get?
I don't, it just wont insert,

« first day (1357 days earlier)      last day (3816 days later) »