« first day (1884 days earlier)      last day (3063 days later) » 
00:00 - 23:0023:00 - 00:00

12:17 AM
Finally
 
Abe
 
Abe
jpeg compression is the least of the problems there :B
 
It returns subdomain: array_shift((explode(".",$_SERVER['HTTP_HOST'])));
Now I want to know, it will work for https too?
 
:|
Why don't you try it?
 
12:30 AM
I did. it works :-)
 
pew pew
automated loads of stuff today!
 
1:04 AM
should i prefix all my column names with the name of the table? example: tablename_columnname
 
nah
 
Why, the column already knows what table it is in
 
@MarkBaker ancient DBA rules coming from NOT STACKOVERFLOW!
 
okay, just wanted to make sure, thanks
 
If you have column names that are the same across two tables that you JOIN, then (and only then) should you provide an alias
But as an alias in your queries
 
1:08 AM
what if I have an associative table with the primary ids from two tables and they both have the name "id", does that matter? (im learning)
or do you never have two primary keys in the same table?
 
there is always one pk per table
it may be across multiple columns tho
 
1:54 AM
@Ocramius hey
 
2:52 AM
mornin roomies
 
 
1 hour later…
4:29 AM
@Danack don't. set overflow: hidden on your user content divs and be done with it
trying to ban abuse of Unicode will also end up biting legitimate users somehow
it always does
 
 
1 hour later…
5:47 AM
<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>
 
6:36 AM
moin
 
6:46 AM
moin Joe
 
onmi
 
Hi.
Wtf, wow. $50k to $70k salary for a PHP programmer.
Damn, that is freaking dope!
 
7:23 AM
hi ,
can anybody tell me how this result to 1 $foo = 1 + "bob3";
as per documentation If the string starts with valid numeric data, this will be the value used. Otherwise, the value will be 0 (zero).
anybody out there?
 
yes
 
can you help me over above confusion?
 
Nope, I know nothing about PHP :P
 
and you know nothing jon snow...
haha
 
7:40 AM
=====================================================================
TIME END 2015-12-13 07:37:35

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   40
---------------------------------------------------------------------

Number of tests :  236               225
Tests skipped   :   11 (  4.7%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
^mongodb+php7
down from 90~ failures ... not bad ...
=====================================================================
TIME END 2015-12-13 07:49:48

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   40
---------------------------------------------------------------------

Number of tests :  236               235
Tests skipped   :    1 (  0.4%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
 
7:59 AM
@John "If the string starts with valid numeric data". Try "3bob"
 
8:15 AM
@nikita2206 I think you misunderstood my question it starts with string and not integer..'
can you please look again
 
$foo = 1 + "bob3" is 1 + 0 , $foo = 1 + "3bob" is 1 + 3, no?
 
now 21, but out of time ...
 
Ben
8:53 AM
Hi how do I properly format this I keep getting "unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING" this is the code "echo '<tr><td>' .$query2['name']. '</td>';
echo '<td>' .$query2['age']. '</td>';"
 
9:10 AM
@Ben what's the double quote doing there?
 
Ben
9:29 AM
@HamZa They were just to show that it was code in the chat I do not have them in the actual code :)
 
@Ben then look at the line before it. Because this one seems correct.
Also use a decent IDE
 
10:05 AM
hi is there a nice library that wraps the ugly php socket functions ?
 
10:29 AM
@vaultah yeah thanks for the reply..I ignore that line ...
 
10:39 AM
Moggu
 
11:01 AM
Hey Guys!
 
Moggurnings11
 
good Sunday morning.
Have not been here for ages. How are you folks?
 
Anonymous
2k for zend certificate oo
 
Anonymous
the world has officially gone mad
 
12:27 PM
@samayo 2K for a 1day course? Oh wait, they do provide refreshments, cost justified!
 
Anonymous
12:47 PM
@crypticツ yeah, it would have been outrageous without those sprites.
 
Why :(, Unable to find the wrapper "xdebug" - did you forget to enable it when you configured PHP?
It's enabled and it is preset in ini.
 
Anonymous
maybr not in the right ini
 
It's right ini /etc/php5/apache2/php.ini
 
Anonymous
1:03 PM
did you compile the src or you just install it with rpm?
 
Installed with apt
5.6
 
Abe
\o
 
Abe
1:55 PM
@Ocramius creating an instance without calling the constructor is impossible without reflection, right?
 
2:10 PM
@Abe it used to be possible with unserialize, not sure if it is now
 
Abe
interesting... checking
 
Abe
2:25 PM
hm, very hacky... much l33t... will use reflection :B
since when var_dump also tells you the file/line?
 
Abe
@nikita2206 oh, cool
 
s/doll/code/
 
Abe
Abe!
 
@Danack hehe
 
Abe
2:36 PM
woa, with unserialize it's even slower than reflection
actually with reflection is fast as long you cache the reflectionclass instance
 
Almost monday!
 
Abe
you mean: almost xmas!
 
2:49 PM
Bah don't like that period of the year. :D
 
Abe
2 weeks off man!
and you can wear red jumpers with teddy bears on them without anyone laughing at you!
 
3:24 PM
Hey is someone here who knows some WordPress? I need help with a PHP me and a guy have written 2 codes and both are ot doing what they are supposed to even though they are correct by documentation
 
3:53 PM
Where is my name????????/
 
@4127157 ... Just ask your Q.
 
4:06 PM
well, it looks like making arglists consistent with userland functions saves a few hundred cpu instructions :)
 
Abe
4:18 PM
@marcio was weakening of reserved keywords implemented in phpstorm? like $foo->new() ?
 
@Abe yes, it works (most of the time) :)
 
Abe
"most of the time" freaks me out :B
so still no reason to upgrade apparently
go jetbrains go
 
I dropped PHPStorm many days ago and will only try it again on their next release. It's possible that it's fixed already.
(or not)
 
Like… PHP7 is new guys :D
 
also like the IDE is in major beta state
:3
 
4:31 PM
jetbrains ide are the best.
I still have to really get used to vim and try a pure cli thing, but I'm not sure if that would be better then jb
 
@FélixGagnon-Grenier nano is my favourite for CLI.
 
nano is a simple text editor?
 
@HassanAlthaf I actually like vim better
 
I never understand vim
It doesn't let me type.. :/
 
4:34 PM
To master vim, you need climb quite the learning curve
But to be productive in it, you don't, really.
@HassanAlthaf vim is a bit different in that it doesn't start in "edit" mode like most other editors start
It starts with "command" mode, in which you can tell it what to do.
 
Productivity in Web Design === Brackets. Productivity in Backend === phpStorm.
 
To enter edit mode, you type i, and to exit edit (or any) mode, ESC
 
And to save?
 
@HassanAlthaf From normal mode, :w
If you want to quit, :q
To quit without saving changes, :q!
And to save and quit at the same time, :wq
 
isn't that :x?
 
4:36 PM
@FélixGagnon-Grenier C-x is nano's.
 
If I edit something and do :q will it be saved?
 
@HassanAlthaf No
It won't let you
 
Let me try.
 
You'll need to either force quit with :q! or :wq to save-quit.
(Think i for "insert" and w for "write")
 
Thanks man.
It worked perfectly for me now.
 
Abe
4:40 PM
@LeviMorrison oh i don't mind waiting, but imho they trick users releasing incomplete stuff, often stating they are complete, just for them renewing the license. compared to php development speed, they are very slow... also as usual php developers are second class developers... afaik pycharm already fully supports python 3.5; us instead don't even have php 5.6 full support :\
 
@Abe PHP has developers?
 
Btw, is CCNA worth anything?
 
Abe
or they probably didn't expect php to grow this much and this fast in the past months.....
 
@Abe I call BS, PHP's syntax/features haven't changed that much
Even ES6 is supported since forever
And ES6 is a lot "newer" than PHP 5.6
 
Through Babel or Transpiled languages, yeah? @MadaraUchiha
 
4:44 PM
@HassanAlthaf Today, you almost don't need babel anymore
ES6 support is fairly good
 
@MadaraUchiha How? ES6 is in development since before ES4. That was 2008 or something.
 
But it's solely thanks to babel.
@AwalGarg But it wasn't a "thing" before babel (then 6to5) made it into a thing.
 
JS is something interesting.
 
No one (to some definitions of no one) cared about it.
 
I love that fact that I can use it as the only language for client and server.
 
4:45 PM
But then people started using it, a lot
@HassanAlthaf I love the fact that I can share rendering logic between client and server
 
@MadaraUchiha Elaborate? Many JS engines already did support many parts of harmony features when they were in development. And yes, V8 included.
 
56 secs ago, by Madara Uchiha
No one (to some definitions of no one) cared about it.
 
@MadaraUchiha Yeah, ikr.
 
@AwalGarg It was in development, some engines supported some or many of the features
 
JS has a bright future.
 
4:46 PM
But it wasn't a "thing"
 
Especially with Node.js
Can you develop native GUI applications with Node?
 
@MadaraUchiha I am not sure how it compares to PHP's releases though.
 
@HassanAlthaf Sorta
 
@AwalGarg Tbh, PHP rushes too much when it comes to releases.
 
@AwalGarg Let's put it this way, as a JS developer, I heard about PHP 5.6 before I heard about ES6.
@HassanAlthaf There's a project called nw.js, which enables that
But it has a reputation for being buggy.
@AwalGarg That made no sense.
 
4:48 PM
@MadaraUchiha I see, thanks. No plans to use it, just information. I'd rather use Java.
 
@MadaraUchiha yeah, I read that wrong
 
@AwalGarg I that read wrong too.
 
hehe
 
@AwalGarg By the way, forgot to thank you. Your help with revealing security issues really helped me a lot in the competition and I ranked #2 overall and #2 in the web. Thanks!
 
enjoy
 
4:50 PM
But, the competition was stupid.
They chose the winners based on Facebook likes.
They chose finalists, 2 in each category and then we had to campaign for Facebook likes................... I don't know how that reveals our developer skills.
 
a competition was stupid? color me shocked :P
 
@HassanAlthaf It's called free marketing and you are a drone
 
@PeeHaa What is a drone? And btw, no one really marketed, we only had a few hours to do that. We got our friends to do that.. and we weren't even allowed to use real life marketing techniques like Facebook Ads, etc.
 
@HassanAlthaf No, it's free marketing to them
They have an event that attracts visitors to their facebook page
 
Oh lmfao.
 
4:55 PM
@HassanAlthaf I am organizing a coding competition. The theme is "Use one of Awal Garg's project from his Github account". You get a personalized message from me if you win. Wanna take part?
 
Their likes are fake, I bet. They've got 100k likes on their page, and they barely get 50 likes on their posts.
@AwalGarg Oh lmfao, I got it.
lel
 
5:18 PM
@LeviMorrison But how would it be possible for people to use new features of a language if it's not supported by the IDE?
 
onim
 
Abe
5:34 PM
@PeeHaa ever used ispconfig?
 
I have
 
lol. I almost want to "don't ask to ask" you @Abe
 
Abe
@RonniSkansing solved :B
 
btw I finally got the php templating scope thing, thanks to your example
 
Abe
my server has more holes in it than swiss cheese
 
5:47 PM
does it taste as good?
 
Abe
i don't like cheese
 
Abe
nope
you canadian?
but i want to try it. should look for a recipe :B
 
yeah. proud french-canadian bred and fed
I don't know why I wrote proud
 
Abe
lol
 
5:51 PM
you don't get to be proud of where you were born
 
mongo down to a few failures only ...
 
Abe
@FélixGagnon-Grenier why not. i am proud to be italian
..........yeah that sounded like a joke
 
yeah, please be :) What I mean is we don't really have a saying on it.
:p
 
Abe
:P
 
5:56 PM
one can, for instance, be happy they were not born in palestine since they get to not be bombed
 
Abe
ahaha
 
6:30 PM
@NikiC why do you say go feels like a defective language?
 
okay so someone said that I should just ask my question so here it is, stackoverflow.com/questions/34249806/…
 
@ircmaxell "if you're coming from a background of statically typed languages with strong typesystems" That part of the sentence is important.
It has many other defects as well, but that one can be construed as an advantage if you're coming from a language with an even weaker type system
That was my point there
 
I am just getting started in PHP, anybody got any tips and reasons as to where it can benefit me apart from my wordpress career as a freelancer?
and reasons to why I should try it over some other language*
 
@4127157 Do you have experience in any other language?
 
6:51 PM
@4127157 If it is for the purpose of "benefitting your wordpress career" you should drop PHP right now.
 
@Andrea so basically GCHQ asks us to play picross? gchq.gov.uk/press_and_media/news_and_features/Pages/…
 
hmm ... "Killjoys" is a actually a pretty good sci-fi series
 
why @ me?
 
the title is surprisingly tereskish @tereško :p
 
@Andrea IIRC you pasted the link here - couldn't find the original ref
had the tab open for few days, may be mistaken
 
7:07 PM
@MadaraUchiha Well, I know Java, HTML/CSS and JavaScript in bits and pieces. And also, XML(if that counts).
@NikiC But why?
 
@tereško What are your favorites in the sci-fi genre?
 
@NikiC babylon 5, farscape (if I am limited to TV series)
 
@tereško Ah, I was thinking books right now ^^
 
Note: currently watching FireFly and loving it, but damn, they need to get rid of the entire country music stuff
 
7:11 PM
@NikiC I also rally liked the first book in Revelation Space series, but have not got to the second one .. so, no verdict on book series as whole
@Ocramius did you make sure that you watch it in correct order?
because Fox fucked with that tv series by airing it all mixed up
 
@tereško no, I am currently just starting from 1 and going to through it - is there a specific order?
 
it would depend on the torrent which you used
some has the correct order, some dont
 
@tereško Noted, thanks
 
@tereško just checked, it is all in the correct order, as it seems
 
@NikiC Would you answer my question? :/
 
7:19 PM
@4127157 Because WordPress is not something that most PHP developers would appreciate dealing with
So "I should learn PHP so I can work with WordPress" sounds like a rather pad proposition to me ;)
 
@4127157 Most people would learn PHP to get away from Wordpress
But I tend to disagree with @NikiC on this
You can definitely learn PHP to be a better WP dev
And it may very will show you the alternatives out there
 
@MadaraUchiha Yes, I will be able to build a lot of stuff if I get better at PHP. Especially the dynamic content for which you don't have any plugins.
@NikiC I won't do it just because of WordPress. It will sort of be my reason for why I got started with PHP. Right now, I don't need it much for the stuff that I do. It was a special request from a client that got me diving in the code and manipulating it and stuff.
 
@Ocramius was someone else
someone should write a sci-fi horror novel where it turns out safety-critical systems are written in PHP 4.3
 
7:35 PM
@4127157 I would normally strive to go beyond
I mean, WordPress is nice and all, it pays the bills alright, but I'd get very bored very quickly if all I had to do was write templates and use plugins
The juicy stuff, the really hard problems that keep me programming at 3AM because I'm fascinated by them, you won't find those with WordPress.
 
Abe
8:10 PM
it works! @LeviMorrison gist.github.com/WesNetmo/60ca2f13c5da189f530d jelly? :D
(method names suck, i know)
 
8:29 PM
Is there a simple way to download all of the files for fonts.googleapis.com/css?family=Roboto:400,700 that doesn't involve doing it manully?
 
Abe
yes @Danack all fonts are hosted in some google code repository
 
Abe
that's cool :D bookmarked it
is it possible that of 8 mirrors tried to download ubuntu server, none is faster than 50kb/s
even torrent is slow as eff
 
8:55 PM
Eh, I have a high-speed connection to a nearby university that mirrors it.
I never have that issue with Ubuntu.
 
I'm creating a API for my website. Now I want to know, which format is good for output? json is good? is there any alternative ?
 
@Danack Impossible! Must wait for IDE support!
@Shafizadeh Depends on the data. Honestly, sometimes a properly structured CSV is good.
And, though few will admit it, sometimes XML is good.
 
@LeviMorrison My data is pure-string (it is just text). I think json could be fine for a developer, it isn't ?
 
Maybe. What sort of encoding?
 
Do you mean is this?
echo json_encode($data);
 
9:00 PM
More like... what sort of text is it?
What are they going to do with it?
 
ah
my website is a dictionary
 
Eh, it's still a generalization but JSON sounds okay.
@bwoebi So what do you think about adding enums like I've proposed and Hack style enums where they are basically grouped constants of a scalar type?
I'm just looking through past conversations and there are a lot of people who have this idea that these simple enums are really good somehow.
 
Abe
the fastest i could find is 200kb/s :|
 
9:15 PM
@bwoebi When you find time will you reread the enum RFC and let me know what specific questions you have?
 
The company I am working at has just switched from using ISO-8859-1 to using UTF-8. We have a lot of code manipulating text/strings and we need to switch our code to use the multi-byte "mb_*" string functions ("mb_substr", "mb_strpos", etc.). Is there any reason not to write a script that will find-replace all non-multi-byte functions to their "mb_*" equivalents? Any caveats to be aware of?
 
If you haven't done so already start with your data storage. Make sure they use the desired encodings etc.
We made a half-effort to switch but gave up when we realized that converting our database was going to be very unpleasant.
 
Yes, I already converted our database to UTF-8. Fortunately the product is not yet live, so there were no data-synchronization issues.
 
Ah, lucky you.
 
9:30 PM
@moteutsch yes, if strlen if ever used to calculate the length of binary data e.g. for the Content-Length for an image that is generated in memory.
 
@NikiC true, but if that's your measurement stick, every other OOP language out there fits that description.
 
And some other cases where you're deliberately separating strings into bytes.
@moteutsch And if you are using MySQL, just to check, you really want to use utf8mb4 + utf8mb4_unicode_ci as well as STRICT_ALL_TABLES or STRICT_TRANS_TABLES.
 
I have an array $array = array('foo' => array('bar' => 'kung foo')); Normally you can modify bar like so $array['foo']['bar'] = 'wing leu'; but let's say I want to do it programmatically and I know that the order to modify bar is 'foo' followed by 'bar'. How would I do it?
 
$index1 = 'foo';
$index2 = 'bar';
$array[$index1][$index2] = 'wing leu';
 
@Abe Cool, thanks, didn't occur to me to look into the locale implications. @Danack Good point with the STRICT_ALL_TABLES, didn't think of that! Also good call with strlen: there must be many more examples of such edge-cases to consider. I'm starting to think that I'll need to manually replace the function calls by hand...
 
Abe
9:42 PM
I'm starting to think that I'll need to manually replace the function calls by hand... -> correct
 
Fun, fun, fun.
 
@LeviMorrison couldnt it be more readable like

function other(RenewalAction $action): RenewalAction {
switch ($action) {
case Approve:
return RenewalAction::Deny;

case Deny:
return RenewalAction::Approve;
}
}

No need to repeat the enum class, because of the ryped param..?
Typed param
 
Not as things are right now, no.
 
@moteutsch What I did is just write a simple tool that checks for the presence of the non-byte safe versions in files, and for the ones that are appropriate to keep, add a comment of "//byte safe" at the end of the line. The shitty code is here: gist.github.com/Danack/6353e61967e7f432669f
 
@danack I would like to be able to do it more generic than that. So I know I have an array array('foo', 'bar') and be able to modify the array. So if I had a deep nested array that looked like ` $array = array('foo' => array('bar' => 'foobar' => 'kung foo')));` I would still be able to modify it if I had the order in the array array('foo', 'bar', 'foobar')
 
9:45 PM
function other(RenewalAction $action): RenewalAction {
  switch (RenewalAction $action) {
    case Approve:
      return RenewalAction::Deny;

    case Deny:
      return RenewalAction::Approve;
  }
}
If we added something like that it could maybe work but I don't personally want to go down that route.
 
@LeviMorrison Sorry, I disconnected. As I said, My website is a dictionary. Other developers send a "word" to my API and my API will return them the mean, phonetic and .. of that word
 
Is it possible to use() a class constant?
@Shafizadeh JSON is probably good, yeah.
 
Tnx :-)
 
@Danack Cool, thanks.
 
Global air traffic patterns https://t.co/Vxj2Qr0pg7
 
9:47 PM
It appears class constant's can't be use()'d.
 
@Jonathan Why do you want to do that?
 
@LeviMorrison I feel the same for return type: when typed no need to repeat the class.
Not sure if technically possible though
 
@danack I would like to validate and modify an input in a deep nested json object essentially.
 
@staabm You want the inference from a compiled language, it seems.
 
Yeah indeed
 
9:51 PM
@Jonathan you could probably do it like:
$pathKeys = array('foo', 'bar', 'foobar');
$element = &$inputArray;
foreach($keys as $key) {
    $element = &$inputArray[$key];
}

$element = 'this does not sound like a valid thing to be doing.';
But I am not sure if it is wise at all.
 
@LeviMorrison it feels like syntactic sugar
 
@staabm It would be prohibitively expensive to do it implicitly.
(I think – it's just a guess)
 
You'd probably be better off either converting the array to objects which can handle that stuff.
 
@LeviMorrison have no clue how the parser/compiler works but I feel like it could be resolved at compile time
 
'works'
 
9:54 PM
@ircmaxell if I was an alien, this would tell me which 3 places to target with the deathbeam
 
@tereško true :-P
 
I am also just doing guesswork.
Maybe @bwoebi can tell us something about complexity, but only in case you agree it is a nice to have syntax
 
@tereško I solved my problem (Architecture of ajax/http request). Using just one IF-statement ...! stackoverflow.com/questions/34245711/…
 
@Danack is there any reason why you're not sure it would be wise to do it that way?
 
@staabm If there are constants Bar and Foo::Bar how would it know which one you mean?
There is more to work out if you want it to work.
But I suspect it may not pass.
In any case its not required for the enum RFC.
 
9:58 PM
@Jonathan Because that code I wrote is crap, and incredibly hard to either reason about, or debug. In particular, it doesn't handle any case where the expected entry in the array does not exist. And the reason why I think the whole idea sounds bogus is that I just never really needed to have deeply nested arrays of anonymous data....
It just sounds like I ought to be asking you why you think you need arrays like that it the first place.
 
@LeviMorrison in my opinion when switch'ing over a Enum value no value despite null and the enum values should be allowed. In case its a Constant like expression which is not defined on the Enum -> fatal error
 
@staabm PHP is dynamic – I doubt a suggestion like that would pass.
Plus there's no way I'd allow null if you went that route anyway :D
 
I am talking about typed parameters.. In case of untyped values noone could make such assumptions
If null is supported or not is a different question.. Have no strong opinion on null handling
 
@Danack So assume that an api endpoint receive this `{
"name": "<br>test</br>",
"score": {
"value": {"forbidden array": "should be int"} ,
"duration": 2,
"date": "2015",
"odd": "data"
"status": {
"condition": "won",
"bogus": "data"
}
},
"forbidden": "data"
}`
how would you go about validating it?
(how do you make the it more neatly formatted?)
 
@Jonathan Validating it, probbly with: github.com/justinrainbow/json-schema
 
10:05 PM
@staabm The fact that the parameter is typed doesn't mean the switch is done on the same type.
 
(press ctrl+k and press up to edit you previous messages).
 
Remember variables can change their type over their lifetime.
 
I wouldn't try to alter the data when validating, just accept or reject it.
 
@da
@Danack Thanks for the advice and and thanks for the link!
 
np.
 
10:16 PM
I have a json result like this:
{
   title: "anything"
}
how can I change it like this:
{
  - data: {
       title: "anything"
    }
}
?
 
@Shafizadeh append the first array to $array['data'] ?
 
@Jonathan Actually I needed to a nested array. like this: $arr['date']['title'];
 
yeah
 
10:49 PM
@LeviMorrison I'd like pattern matching too, but I don't think we should use case
I still think we should allow & at call-sites so it's obvious when a function takes a parameter by reference
Removing call-time pass-by-reference was good. Removing the ability to use & in function calls was not.
 
00:00 - 23:0023:00 - 00:00

« first day (1884 days earlier)      last day (3063 days later) »