« first day (1811 days earlier)      last day (3143 days later) » 

12:32 AM
I'd hate to ask this question, since a lot of my questions are rather dumb. But is there a way to emulate PHP7 argument typehints using classes or something so for 'int' make a class called 'int', etc. So that migrating code that uses scalar typehints from <7 to 7 is as simple as removing those classes. or do I just have to add them all in when the time comes?
 
No simple way I am aware of.
 
I just came across this secure.php.net/manual/en/language.oop5.typehinting.php#83442 haven't tested it yet. But sure has a lot of upvotes.
 
Yeah, you could use an error handler.
Seems… really hacky.
 
CakePHP is discussing using it to do what I'm trying to do, but they say it could cause problems with error handlers. I don't use error handlers so I think I'm safe.
hacky, sounds like my kinda code =oD
lol
 
12:48 AM
@crypticツ you should probably just see how much work it is to just get you current code working on 7 without dumb hacks. It's likely to not be a lot.
 
1:14 AM
mornings room 11
 
HI
need suggestions about Php
can someone example how I can run applications in realtime from Php?
<?Php
mouse position realtime to ->
<- mouse position realtime from
?>
something like this, but, I mean:
I don't understand how you pass the data in realtime
the mouse was an example
to send data in realtime
 
1:41 AM
@neoDev are you talking about AJAX?
 
good morning
 
morning Orangepill
 
morning
 
@neoDev you probably don't want to pass the data realtime...
the wires in your computer move data around a lot faster then the wires to the internet
Side note... had second phone interview with a prospective employer today ... I felt it went well ... scheduled the next interview for tomorrow
 
all the best
 
1:56 AM
thanks... haven't had to look for work in 15 years... was a little nervous leading into this process but it has overall been a good experience so far.
 
why you are nervous?? you have excellent work experience
 
in the same place... coding alone in the back room... proof of experience was more the issue
 
why?? company didn't provided work expereince letter @Orangepill
 
I'm leaving them at 15 years... they are a little butt hurt about it
 
:) yeah it will definitely hurt them
i will also start job hunt after a month
 
2:10 AM
good luck on that... don't do what I did... find a job before you give notice :)
 
it will be kinda my first job still have degree problem :(
 
For phpunit.de/manual/5.0/en/… if the test covers more than one method do I make two separate @covers annotations or is it comma or whatever separated? I don't see an example of multi-method test use even thought it uses the phrase 'methods(s)'.
 
Based on the last example in 11.2 here I think it requires multiple covers statements
@crypticツ ^
 
thanks!
 
Abe
2:47 AM
why do you need @covers anyway? latest phpunit/xdebug combo is pretty smart understanding what the test covers
 
@Abe @covers is used to declare what's actually being tested, not just what's executed during a test
 
Sigh… auto-closing over scope is not an issue.
 
Abe
and isn't that a test, too, after all? @PaulCrovella
 
And if it is, stop proposing silly stupid new notation for it
 
@Abe not necessarily - it's possible for all kinds of shit to execute during a test that you're not actually making assertions against the results of, and without @covers you'll get faulty coverage information
 
Abe
2:59 AM
@PaulCrovella coverage is a guess anyway
 
and if you're gonna use it you may as well make it an educated guess
 
Where do theoretical mathematicians get there drugs.......
 
Abe
lol, fair enough, but it's not worth the effort imho
 
hey. Anyone can guide me on figuring out the cause of a segmentation fault.
I've run strace, but no idea what it means
 
3:16 AM
@LeviMorrison My favorite part was suggesting named functions that depend on a variable of a certain name to be declared.
 
@Trowski I missed that one I guess.
 
function bar(string $x, int $y; int $a):int {
   $b = strlen($x) + $y + $a;
   return fn(int $c; int $b):int => $b + $c;
}

$a = 5;
bar('hello', 1)(2); // lucky number 13
^ lolwut?
 
I'm having a problem with my date cause it is set to timestamp and on update current_timestamp. I bought an item yesterday and yeterday is 09/30/2015. And it updated the time this day to 10/01/2015. Any help please? thanks
 
@Trowski This is the ; int $a stuff.
The ; $varlist is the import
 
@micaela what time zone it the date being represented in
 
3:25 AM
@LeviMorrison Right. So there's a named function bar that depends on a variable $a to be declared in the calling scope.
 
philippines
i used (NOW())
 
So the time is about 8 hours off from what you expect it to be.
 
Everyday it updates to this day. I don't want it to be updated.. If I ordered yeseterday the date must be yesterday not now.
 
Then you need to set the database to represent the time in the same timezone you are in.
 
guys, what do you use to run selenium from php?
 
3:31 AM
Thanks
 
@Micaela don't use the "on update: current_timestamp" option.
@Micaela or do you mean it's updated even if you never updated the row
 
so i will not use on update current_timestamp in my field?
so it will not be updated everyday?
 
don't use on update
 
yes it updates the date to this date right now even I ordered the item last week/yesterday
thanks
 
morning
 
3:52 AM
o/ morning
 
 
2 hours later…
5:38 AM
2 hrs silence ;p
 
6:10 AM
Morning
 
morning o/
 
moin
 
morning Joe
 
6:34 AM
What would I do without coffee and red bull <3
 
moin o/
 
Hi guys, can anyone tell me how to print utf8_unicode_ci database table data? in PHP
I am getting ???????? in output. What I need to set.. I am Java Dev.
 
So, you need it in java or in php?
 
PHP
Anyone...!!!!
 
Sorry, I'd help if I knew.
 
6:52 AM
No Problem... :)
 
7:02 AM
@ArthTilva posting the code you alreay have might help. if its more than 3-5 lines, please use a pastebin and then link it here instead
 
You are late bro, I found solution, any way thanks...
 
7:15 AM
hii guys
cuurently i m using joomla for cms for my website
due to server downtime want to change it to other cms
any suggestion
 
^ stay away from joomla drupal and wordpress
10
maybe give bolt a try if you want to stick to php
 
any suggestion then apart from these..this is troubling a lot
 
@Patrick What's wrong with Joomla? :(
 
@GyanendraMani haven't used it, but looks much better then the others on first glance github.com/bolt/bolt
 
ok will luk at it
 
7:24 AM
good morning!
 
Good morning
 
Good afternoon
 
7:44 AM
noon after good
I have a field (date_ordered). it is set to timestamp on update current_timestamp. my problem is when I ordered yesterday (09/30/2015) or last week. It updates the time by this date (10/01/2015). I dont want it to be updated. If I ordered on that date, I don't want that to update to this date.
any idea? help please thanks
 
What's your timezone?
 
"INSERT INTO tb_empgrocery (coopmemID , date_ordered, item_no, qty_ordered, unit_price, amount, item_status)
                            VALUES ('$coopmemid',(NOW()),'$itemno[$x]','$qty[$x]','$unitprc[$x]','$amt[$x]', 'Available')";
I used (NOW())
This is my field date ordered
date_ordered	timestamp		on update CURRENT_TIMESTAMP	No	CURRENT_TIMESTAMP	ON UPDATE CURRENT_TIMESTAMP
 
\o
 
o/ @Fabor
@Micaela well you know your mysql timezone could be different from what you are expecting right? take a look at setting timezone and getting timezone
 
Do Ii have to use on update current_timestamp?
 
8:00 AM
Good morning
 
morning Alma Do
 
CMS = Create Massife Suck; CMF = Create massive F*ck :p
 
@samayo That's what's wrong with it.
 
posted on October 01, 2015 by nlecointre

/* by Frankie */

 
8:10 AM
@AlmaDo So which one is better? ;)
 
I stayed away from both always
 
question: I have a php web app deployed using codeigniter. then I reinstalled wamp server, when I enter localhost on my browser it says I don't have permission to access my web app. what could possibly went wrong here?
 
everything went wrong since your word #10
 
@LGL sorry I have been too busy yesterday, HOWEVER if you still need help with your counting thingy, I'd love to help you out.
Morning.
 
uopz for PHP7 has a new toy ... https://github.com/krakjoe/uopz/blob/seven/disassembler.md #php #php7 #scaryThingsMightHappen ... tests will come ... sometime ..
I'm tired ... like falling asleep at desk tired ...
 
8:33 AM
o/
 
Is that even possible to use your pthread out of CLI? directly using in our code and run it when user send any request or something like that — user2279045 2 hours ago
I haven't escaped the problem I wanted to escape ...
grrrr ...
 
Anonymous
@JoeWatkins uzop needs a php newbie-friendly guide/intro
 
morng
 
Anonymous
morng
 
@samayo no
it's specifically for not-newbies
I don't want any newbie to get close to uopz
 
8:44 AM
yeah, it can do some scary stuff, you know if you need/want it already, and know why ;)
 
@samayo Also: is there something unclear about the manual?
 
also moin
 
"The author of uopz does not accept responsability for scary things that are written using uopz_disassemble ..." - This just lol'ed me. No idea why...
 
I have a field (date_ordered). it is set to timestamp on update current_timestamp. my problem is when I ordered yesterday (09/30/2015) or last week. It updates the time by this date (10/01/2015). I dont want it to be updated. If I ordered on that date, I don't want that to update to this date.
any idea? help please thanks
 
Anonymous
@PeeHaa disassembly
 
oh, that's only a day old ... no manual yet ...
 
@Micaela Are you saying a select is triggering something??
 
@salathe LAWLz XD
 
Anonymous
I have heard / only know about assembly and webAssembly
 
8:48 AM
"DisasSemble, DEAD...!!! NO DISASSEMBLE!" , thanks :-)
 
hehe
 
Do I have to change my field (date_ordered) type to date or timestamp?
@PeeHaa
"INSERT INTO tb_empgrocery (coopmemID , date_ordered, item_no, qty_ordered, unit_price, amount, item_status)VALUES ('$coopmemid',(NOW()),'$itemno[$x]','$qty[$x]','$unitprc[$x]','$amt[$x]', 'Available')";
I used (NOW()) for timestamp
 
@Micaela Using a timestamp is completely fine...
An insert does not magically update an existing row....
 
@MikeM. but it updates the date_ordered everyday even though I ordered the item last week or yesterday
 
"my problem is when I ordered yesterday (09/30/2015) or last week. It updates the time by this date (10/01/2015). I dont want it to be updated."
 
8:50 AM
in my table
 
3 mins ago, by PeeHaa
@Micaela Are you saying a select is triggering something??
 
For example. I ordered an item right now. So date_ordered must be (10/01/2015). But tomorrow it will be updated to (10/02/2015)
in my table.
but in the database still (09/30/2015)
 
Wait wut
Why do you have an date_ordered field?
oh nvm
different order :P
 
where I can post pic?
 
confusion galore :P
 
8:54 AM
so I can show you
 
Set the timestamp in php and have full control
Just be aware that with great control comes great responsibility
 
Yeah drop that on update
 
I will change it to?
 
If you ever need to update something in there yourself for whatever reason the ordered date will be wrong
I would personally handle it in php
The moment somebody finishes the checkout process set the timestamp manually and be done with it
 
8:58 AM
@rdlowrey Lol, had a chat with Brian, seems awesome so far :-)
 
just like this?
am I doing right? I removed on update current_timestamp
 
Depends on when you create the order in the table. Once the user started adding products or once the user finishes checkout
 
9:19 AM
so, my talk description promised "This will be illustrated with examples from real applications, where possible."
well
almost none of my examples are from real apps, but arguably I couldn't use real examples in those cases
I wasn't technically lying
 
Is there a reason to not put this option on? PHP also allows for short open tag <? (which is discouraged since it is only available if enabled using the short_open_tag php.ini configuration file directive, or if PHP was configured with the --enable-short-tags option).
 
Haha, will be good :) Hopefully we're all rooting for each other and we don't get a complete bell-end like at the PHPSC conference that heckled @Danack ;)
 
It's the questions at the end I'm not looking forward to
 
@Patrick How is your book going? :D
 
9:26 AM
@Jimbo I'll be sure to get @leigh to ask some really hard ones.
 
Already planned on saying "Not sure the best way of answering that in the time I have, perhaps we can chat about it after the talk?"
to every single question
 
while($question) { talkToMeAfter(); }
You mention about passing your DiC in to your factories in the talk?
 
@Andrea why must "\u{" cause a parse error?
 
In fact, the more I think about it, the more I think it's possibly a beginners talk
 
@Jimbo what's your email ?
 
9:34 AM
hotmail. -_-
 
We have already had this discussion about hotmail
lol
 
Is hotmail still valid? :O
 
IE 5.5 is still valid
 
@AlmaDo really?
 
@Epodax yeah
 
9:39 AM
@AlmaDo I though IE 5.5 was long dead and gone, and if anyone used it they would've been told to update.
 
Abe
@Jimbo :D
 
I mean, even Windows XP used IE 8 doesn't it?
 
so what?
 
So, doesn't that kinda invalidate IE 5.5?
 
@AlmaDo Valid for what? To point and laugh if you ever manage to find somebody still using it? :)
 
9:44 AM
@PeeHaa now that's finally a good direction. "Valid for what?" is the key :p
But, however, even though I think @PeeHaa is invalid :P
 
@AlmaDo ANd you won't even be lying :P
 
PeeHaa is totally valid, if only for his sassy comments
 
sissy*
 
Oo
 
Snap.
 
9:45 AM
lel
 
so , @Jimbo is a validator for @PeeHaa's sissy comments? em... ugh.. okay ..
 
<3 you all
 
^ somehow I see first two symbols as an ass (:
 
@AlmaDo class SissyValidator implements Validator { public function validate($data) { return in_array('PeeHaa', $data); }}
 
Or a' ice cone with two scoops.
 
9:46 AM
I haven't mentioned this, but I'm actually pretty ill atm
Coughing up, sneezing
 
@Jimbo It's your body's way of saying "Winter is coming"
 
My talk is on Saturday and I tried practicing my talk last night, after 15 minutes I completely lost my voice
 
now you're making excuses to skip the speech? Cool story, hehe
 
youtube.com/watch?v=3uInqpHr8vc <== Why do I never see this kind of shit in the netherlands :-(
 
^ (not even watched) - because @PeeHaa is there?
 
9:49 AM
I think trying to migrate a Drupal system is going to finish this puppy off :(
 
For anyone who missed my genius Laravel bashing last night...
#laravel #frameworkWars https://twitter.com/adamliaw/status/648690417618194432
(the original tweet wasn't even related ;-))
 
lolaravel?
 
@JonClements I'm sorry for you :P
 
@PeeHaa don't be sorry - provide beer :)
 
@Duikboot I've been lazy as usual :(
 
9:52 AM
@JonClements You are more than welcome to come over :)
 
Okay... but if I do and I'm foaming at the mouth - it's not rabies - it's Drupal!
 
:P
I don't see much difference tbh
 
Rabies does seem like a more pleasant alternative right now though...
 
:D
 
Ha
 
10:04 AM
@JoeWatkins Paid
 
Jimbo, you'll recover by Saturday. Just get some vitamin C and rest.
 
@Jimbo ta
 
@JonClements Drupal woes? Speak to @FlorianMargaine he's actually pretty good with it.
 
I'd certainly appreciate any advice I could get - I'm sure @FlorianMargaine's a busy guy though :)
 
Busy with JavaScript, the dirty bugger
 
10:10 AM
my heart goes to lisp though
@JonClements ask away, I might have an answer
 
Abe
last updated 20 years ago and somehow still online pacificgrandprix.com
 
@Florian cheers. Ever had a site work fine, you open up the dblog, click on an entry, then suddenly the theme just doesn't work anymore?
No errors reported anywhere... - viewing the dblog is fine... click on an entry - boom - site borks
Content still works - but no images or CSS umm...
 
sounds like a permission issue on your sites/default/files/
 
how to make tag system like stackoverflow
 
Hello all - I have a class (called accounts) which in it's constructor has 3 classes DI into it. These are repository classes for my db layer
I want to have a base logging library available (in this case monolog)
 
10:17 AM
@Florian rightio - I'll have a look - seems weird that it all works fine as long as that action isn't taken...
 
if I create a parent class, how do I access the logging library by $this->logging
because I have a constructor in the child class, the class doesn't inherit the parent constructor.... amirite?
 
@Florian - ahhh huh... dropped the database, reloaded it, refreshed - it now works
So.... accessing the database in someway causes it to go kaboom
 
@EquinoxMatt That's correct
 
ok, so what would be the best way to go about this?
 
What are you trying to do?
 
10:24 AM
to clarify I am using ZF2
so I create the accounts class
via a factory method
 
@JonClements ?!
 
which injects the three repository classes via the constructer
the problem is, I want to have a logging library available to all my classes
so I figured I could just create base class, which everything can extend
and therefore access the logging library
 
@FlorianMargaine repeat action - check error log - now getting a beep load of PHP Notice: unserialize(): Error at offset 2 of 55 bytes in /var/www/fgmuga/includes/bootstrap.inc
 
@EquinoxMatt You could use a decorator for your logging. Think about it. Your classes have no business of knowing about logging if they can avoid it. Decorate your objects that require logging
 
@FlorianMargaine which from googling looks like DB corruption issues... umm... let's see if some of the fixes will work...
 
10:27 AM
@Jimbo
oops @Jimbo - thanks, I will do some reading on that pattern, I don't think I have used that one before
 
class RepositoryLogger {
    public function __construct(Repository $repo, Logger $logger) {
        $this->repo = $repo; $this->logger = $logger;
    }
    public function __call($method, $args) {
        $data = call_user_func($method, $args);
        $this->logger->log($data); return $data;
    }
}
Not exactly the right syntax (call user func might be call_user_func_array) but you get the point
 
Just to clarify, the logger isn't specifically for the repository classes, it could be for any class
 
Yep, so decorator is a good pattern for that... just name it well. That's how AOP does it, it's just automatic decorating after reading an annotation that requires logging. Problem with this approach is you only log the outputs of those method calls
If you need to log half way through your code executing, you should consider the observer - your object sends data to anything observing it, doesn't care if it doesn't have anything observing it, and you can add / remove an observer (logger) at any time
 
@JonClements never got that... looks like your cache is wrong. Try clearing it.
 
god damn it, observer is something I should of thought of!
That sounds like the solution
Thanks @Jimbo!
 
10:33 AM
morning
 
@EquinoxMatt No probs, glad it was helpful :)
 
Although I will do some research on the decorator! :) Have a good day
 
Is it possible to I use $.ajax in the same time?! I mean is send and receive in the same page. Is it possible ?
 
ah, then seems my error has another reason, anyway ok tnx :-)
 
10:40 AM
np :-)
 
@NullPoiиteя also please change your avatar, it is disgusting a bit ;-)
 
@Sajad Ajax what's that? I know it's a soccer club but any further..? What do you mean?
 
@MikeM. what? you don't know what is ajax ?
 
@Sajad Nope.
 
I know it's filled with noses :P
 
10:45 AM
 
Oh gawd what's that?
is it a new form of herpes?
 
@MikeM. AJAX is a developers dream, because you can:
Update a web page without reloading the page
Request data from a server - after the page has loaded
Receive data from a server - after the page has loaded
Send data to a server - in the background
 
What the heck is JavaScript?
 
while(true){headDesk(); facepalm() }
@Sajad naa that image is awesome
 
I know what AJAX and JavaScript is hence I am being sarcastic...
 
10:48 AM
@NullPoiиteя his teeth are creepy !!
 
@MikeM. google translator doesn't understand sarcasm :P
 
@NullPoiиteя The fact someone is using Google Translate is already a shame...
 
@MikeM. you are crazy !
 
@MikeM. come on man its not possible to know every language
 
@NullPoiиteя agreed
 
10:50 AM
@NullPoiиteя If it's not english or dutch, I simply don't care ^^
@Sajad Thanks for the positive comment ^^
 
:-)
 
@Sajad ajax isnt developers dream bro... you got fucked up when you have to make hundreds of ajax request (i.e. B2B application) and manage other things according to them
 
@NullPoiиteя but one thing, how do you know I use google.translate ?
@NullPoiиteя you are right
 
@Sajad clue! every single screenshot you have posted here has google.translater tab opened
 
@Sajad If you read something like "I good have feeling it works", we know you use google translate.
 
10:52 AM
@NullPoiиteя :D, good for you. you are a clever person
 
I use google translate to write something funny in English and then have it translated to Russian and then spoken out loud, it's what I spend my Friday evenings on.
 
@MikeM. i dont know dutch (though dutch people are really cool) but i do know 3 other language as well as English does that count :P
 
@Sajad please, never link people to w3schools. Not even as a joke.
 
@NullPoiиteя I was more likely talking about a personal preferrence. :-)
If it's not english or dutch, it's not worth my time as the creator did not put his time into the text, translating it to either english or dutch.
 
@NullPoiиteя Does Norwegian / Swedish / danish count as "knowing" 3 different languages? :P
 
10:55 AM
that page is filled with bad vulnerable code, bad practices and outdated advice
 
@tereško I don't know why, but I like w3schools, it has a good design and I can learn programming language simply in this site
 
@Sajad you can learn bad programming simply
 
@Epodax yes, Sure!!! :D
 
Morning
 
@kelunik Morning.
 
10:56 AM
emm, I don't know, maybe if I use another website, I have feel better .. maybe
 
@Sajad man try MDN
trust me i am not that stupid developer.mozilla.org/en-US/docs/Web
 
yes, it is good
 
@Sajad Did you use google translate for that sentence?
 
@MikeM. yes, why ? :-)
 
"maybe if I use another website, I have feel better .. maybe"

The "I have feel better" part :P <== that's what I meant earlier ^^
 
10:58 AM
@MikeM. lol ! I see :-)
 
@MikeM. so what is the correct of it ?
@NullPoiиteя thanks, I will take a look at this.
 
@Sajad Just out of curiosity, do you copy all our sentences into google translate to understand what we are saying?
 

« first day (1811 days earlier)      last day (3143 days later) »