« first day (1626 days earlier)      last day (3304 days later) » 

12:15 AM
@sam_io yo
 
1:11 AM
Anyone here mess with Laravel?
 
1:27 AM
@MatthewH hrhr
Not the best place where to ask, heh
 
user4330208
2:12 AM
Should you always put a tbody element inside a table element? Is there any good reason not to?
 
2:42 AM
Hello, how to pass a value from php to javascript? I'm working with smarty and i tried this but js seems to take it as a a string. The value is set to 20.
$smarty->assign('settings', $settings); //$settings is and array
$settings is coming from an file, basically it are some settings.
i want to select an option in an html doc with that value but it is not working.
<select id="entrys">
    <option>5</option>
    <option>10</option>
    <option>20</option>
</select>
and the js file then:
$(document).ready(function()
{
    $('#entrys').val("{$settings['frontendEntrys']}");
});
BTW: Is it a good way to pass some settings with smarty or generally? How can i pass the values if i don't use php?
would i do it like this? Is this a good way, if it's done in an html file?
<script>
    var data = <?php echo $settings['entrys']; ?>
</script>
 
3:01 AM
posted on March 30, 2015 by kbironneau

/* by kraz */

 
 
2 hours later…
5:28 AM
I made a thing. Constructive criticism always welcome: reddit.com/r/PHP/comments/30s13n/…
 
6:00 AM
Laravel rocks @SergeyTelshevsky
 
7:03 AM
moin
@Rican7 how did "hydration" ever become a thing?
Is that name even used outside of doctrine?
 
7:21 AM
good morning
 
@Patrick afaik it came from Java
 
ah I see
48
A: Clarifying terminology : "Hydrating" an entity : Fetching properties from the DB

SlomojoHydrate began as a term for populating an instantiated (but empty) value-object/model from a db, (specifically in Hibernate.) Various other ORM's and tools like BizTalk use Hydrate and other related terminology these days, (e.g. BizTalk uses the term Dehydrated to mean an instance is available b...

 
mornings
@Gopal actually, it doesn't
I would as far as to say that it kinda sucks: bad practices and even worse community
 
7:38 AM
yeah laravel for the bin
 
> Only if we could harness stupidity as a source of energy, humankind would be set for interstellar travel.
7
 
7:50 AM
@Rican7 I liked the description, then I scrolled down and saw HydratorInterface
 
moin
 
        foreach($input as &$string) {
            $string = filter_var($string, FILTER_SANITIZE_STRING);
        }

        return $input;
that, uh, looks kinda wrong
otherwise the lib looks good @Rican7
 
Moooorning
 
8:08 AM
moin
 
mogguh o/
 
Good morning
 
I have an idea of learning a new language, I'm looking at Dart, can anyone elaborate on that? Maybe someone has some experience with it?
 
isn't Dart dead-ish ?
 
@SergeyTelshevsky IIRC @LeviMorrison uses / used it / is a fan
 
8:18 AM
@tereško I see it's getting born and can't say if it will be born dead or not :)
@PeeHaa interesting
anyone can suggest anything else? probably not web-focused?
 
@SergeyTelshevsky Rust
 
@NikiC what is the main focus of it?
what tasks it solves best
 
As I have heard, Rust aims at the C/C++ userbase
 
@SergeyTelshevsky High performance, low level programming while providing full memory safety
Yeah, it's basically like C++, just without all the cruft and all the segfaults ;)
 
8:34 AM
imfo, you would get more immediate benefits from learning advanced javascript
 
If you want to stay in the web niche, then yeah ^^
 
well, yes
thing is that "desktop programming" has a high entry barrier
you have to both learn a language and learn one or two frameworks
I might be mistaken, but making desktop apps is not really viable without a UI framework
 
Yeah, otherwise cross-platform compat goes out the window...
But well, I don't think Rust is particularly aimed at graphical desktop applications right now
 
yeha, it's more a language for writing some part of server infrastructure
or maybe - a high-performance lib
 
8:47 AM
@tereško GUI are awfully boring to write
s/write/code for/
 
@FlorianMargaine depends on the type of GUI
 
@FlorianMargaine About as boring as your average website probably
 
I bet coding a game gui is much more fun than for office type of app
 
@SergeyTelshevsky a game gui doesn't have many GUI elements
 
hmm ... we might see permanent settlements in Antarctica in our lifetime
 
@JoeWatkins fyi mapmywalk is spamming your twitter
 
@NikiC fixed
 
@FlorianMargaine well if it's some arcade game then yes
 
moin
 
9:11 AM
o/ @DaveRandom
 
<-- is not a fan of Monday
 
@kelunik @bwoebi reminder that wiki.php.net/rfc/in_operator end date has passed
 
@kelunik @bwoebi thanks for the work on this ^
 
9:31 AM
+1, really miss in almost every day
 
@NikiC yep, but not my task to close this.
@rdlowrey reminder that generator delegation end date passed too…
Are now all votes finished?
 
@LeviMorrison still needs to close his rfc
but yes, all finished
now to review and merge ^^
@bwoebi when rebasing generator delegation pr, please also change phpt from tabs to spaces
 
@NikiC hmm why? There is no unified code style used for them… some are tabs, some are spaces in php-src.
 
oh? I thought phpt was space indentation
mixed sucks
I remember something about PEAR for phpt tests
but maybe that was for docs?
 
9:44 AM
no idea...
 
It would be good if it was the same everywhere, otherwise people edit files and fuck up indentation
 
I'm anyway using 8-space wide tabs in nano to distinguish spaces from tabs…
 
@NikiC but people already fuck it up even in .c files… I think after your AST refactor there were a few lines having spaces in it…
 
9:49 AM
@bwoebi yes, it happens
But if it happens, we know how to fix it
For tests, now I can't tell you to retab your files because you rightly note that we have no fixed convention for this
 
@bwoebi Happy bloody (belated) birthday! Hope it was a good one :-)
 
@Jimbo Yes, except it only was 23 hours due to DST ^^
 
Nice :D
 
@NikiC automatic retabbing sometime fucks finely indented lines up…
 
10:11 AM
Morning all
 
10:30 AM
@bwoebi Then your retabbing implementation is broken...
 
@NikiC maybe there exist better retabbers out there…
 
10:46 AM
Is kerberos authentication still supported by PHP it doesn't seem to be maintained since 2003/PHP4.3?
 
@john-jh Generally if you want to authenticate against AD you just do it with LDAP
 
@DaveRandom Having to connect to connect to Microsoft Dynamics Web Services (SOAP). Usual case of no/poor docs and talking to windows from PHP
 
Anonymous
11:10 AM
@DaveRandom yo
 
Anonymous
Hows it going?
 
Can anyone help with MySQL queries? I have constructed the 2 that I require (both use joins) however trying to get them both down into one is proving more difficult that I thought
 
hi
 
Hi :)
 
can anyone help for yii2
?
 
11:13 AM
@Prashant Never used it, but post the question there are plenty of people here who could help
 
@JustSteveKing i blocked
for question
 
Oh happy birthday @bwoebi
 
@sam_io hey :-)
 
@Prashant Ask away in here I mean
@nikita2206 are you any good with SQL statements ??
 
Anonymous
@DaveRandom thanks for the tons of best advices, they are paying dividends now.
 
11:24 AM
@sam_io how are you with SQL statements?
 
Anonymous
@JustSteveKing ask it
 
I have 2 queries and want to try and merge them into one. However I seem to be struggling getting them to work as expected.
QUERY 1 : SELECT * FROM people LEFT OUTER JOIN people_const ON people_const.person_id = people.id WHERE people.id='u55154b923d79e'
QUERY 2 : SELECT multi_field.field, people_multi.* FROM multi_field LEFT OUTER JOIN people_multi.field_id = multi_field.id WHERE people_multi.person_id='u55154b923d79e';
 
Anonymous
which rows are you expecting for the results
 
I am expecting all of them from people.*, people_const.*, multi_field.field, and people_multi.value
 
Anonymous
Are you getting any errors? Q1. Looks ok to me
 
Anonymous
11:36 AM
Though I use left join, not left outer join.
 
Anonymous
Am sure @DaveRandom can solve the problem in a second ;)
 
@JustSteveKing sample table structure, data and desired output would be good, struggling to see the relationships from those queries alone (sqlfiddle.com)
 
With both queries they are returning no errors at all, they seem to work perfectly. However it is when I am trying to combine them so that I can use one query
 
@sam_io What are you up to these days? Finished school?
 
@DaveRandom here you go : sqlfiddle.com/#!9/6b5b2
 
11:40 AM
@JustSteveKing Pretty sure the second query is invalid, specifically LEFT OUTER JOIN people_multi.field_id = multi_field.id
Dunno, might be a shorthand syntax I'm not aware of
 
@DaveRandom The second wuery definately works :) I have tested and used
Here is the desired output : pastebin.com/mzxBcF3X
I am achieving this with 2 queries currently, however as they both relate to the one person - I want to return all at once
 
Anonymous
@DaveRandom it was just a language course. Yeah it finished. I am trying to stay above the group with php, so I am here once again.
 
@JustSteveKing So presumably you are expecting to get a lot of repeated data in the result set? Remember that a result set has to be a table, i.e. same number of columns for every row. Because your data is 2-dimensional, it's likely that 2 queries is the better solution overall
@sam_io Still in... Switzerland was it?
 
@DaveRandom That may be why I am struggling to get the data in one query then! As there could be repetitions in the second query as in a person could have multiple jobs etc etc. 2 Queries it is :) Thanks for you help!
 
Anonymous
@DaveRandom yeah
 
11:52 AM
1. I am trying to upload image. I can upload image successfully when i write code as
[['file'], 'file']
.

But i have problem when i write code
[['file'], 'file', 'skipOnEmpty' => false],
.

Page refresh and file input gets blank.

2. How do i give multiple file input?

ex smallimage, largeimage at different places
 
Anonymous
@Prashant are you using a library?
 
@JustSteveKing Well, you can get all that data in a single result set, but you will end up with all the data except the multi-field stuff repeated on each row. Depending on the use-case it may or may not be better to look at using a storage engine that can handle multi-dimensional data (i.e. nosql), but often simply "multiple queries" is the right answer. Don't get too hung up on reducing the number of queries, it's generally good, but not at the cost of query complexity and/or code readability
 
12:13 PM
@sam_io no
 
Anonymous
@Prashant in that case, your example code does not look like a way to upload an image
 
12:32 PM
@DaveRandom Thanks for the advice! I will be eventually moving onto noSQL once my data set grows more however for now standard MySQL is plenty
 
@sam_io : i am using UploadFile library... sorry i am new user to yii2
 
@Prashant is this a legacy project? if not, you should not use yii...
 
12:47 PM
@NikiC thanks for the reminder, noticed it yesterday but was too tired to do anything.
 
user895378
morning
 
@DaveRandom Can you use LDAP as a drop in replacement to kerberos or will the windows server need configuration changes? I've not touched windows for 10 years.
 
Morning @rdlowrey
 
user895378
@bwoebi yes sir. I closed the vote last night before I went to sleep. It looks like some kind soul has already updated the main wiki page to move it into the "Accepted" section :) Will mail the list in a couple of minutes.
 
@rdlowrey hehe :-)
 
12:51 PM
@john-jh Not really, kerberos is a full blown authentication system, and LDAP (AD) is a database. The most common task is to simply authenticate user input (username/pass) against LDAP as a valid AD login, in which case all you do is connect do AD using the supplied username/password and check whether or not that was successful. It seems odd that a web service would require full kerberos auth, the article I linked seems to discuss using the service from languages outside the .net eco system.
tbh if you need to do kerberos auth, PHP is probably not the right tool for the job
Do you have docs that indicate the need for kerberos auth?
 
@DaveRandom I thought so much. It is possible to use NTML authentication but wanted to avoid it if possible because it was superseded by kerberos. Give me oAuth anyday
 
Even using NTLM from a web application is sort of weird, I know there were some old MS implementations that sort of shoe-horned it into HTTP auth but afaik that was abandoned a long time ago in favour of things that, y'know, work
bbiab, meeting
 
@DaveRandom Ye it's 2009 Web Services binaries for 2003 Dynamics. Head against a brick wall give me a REST job . Thanks for the insight.
Haven't touched SOAP for a good few years
 
@Patrick yes it is legacy project? why i should not use yii
is there any solution on my problem
 
1:05 PM
@Prashant you should not use it for a new project because it is full of bad practices. But if it's a legacy project, of course you don't have a choice
If your question is very yii specific, you might have better luck in a yii forum or chat if you can find one. I don't think a lot of people here use yii
 
@Patrick thanks i am already on forum. but there too slow process of answering.
@patr
@Patrick why it is bad practice to use yii for new project
 
@DaveRandom So you hear what killed my internet on the weekend for about 15 hours? :)
Some git decided to use my IP.
 
Anonymous
@Patrick how hard is it to get intern in zurich?
 
1:20 PM
@sam_io Not sure about IT, but marketing is pretty easy I think (my company is always searching for them...)
 
Anonymous
@Patrick I got 3 Oks over the last 5 months, but failed solely for not knowing the German language. Is that a must everywhere?
 
@Prashant It had a god object, uses static as globals and much more. Just a bad piece of code
 
Anonymous
Here in Vaud no one cares if you speak French at all.
 
@sam_io I can't speak for everyone, but it matters here. Otherwise, how would you communicate in your team? English?
 
Anonymous
@Patrick Yeah, I did 2 months for liip, and I didn't even know shit in French then.;)
 
Anonymous
1:27 PM
I want to learn German though, I am making some efforts. I don't know if B1 level is worth something there.
 
@sam_io really is a moronic question, and the answer given on stackoverflow is going to be wrong, a lot of the time ... what it does is return name of the first reference in global scope, but cannot deal with multiple variables that reference the same object, cannot deal with caller being method (function) scope ...
 
@Tyrael you're not even mentioning the distros packages...
 
seems like XY ...
 
then why not look for a job instead of an internship?
If you are not able to communicate at all in german, an international team might be your best bet. If you are able to speak some german, I'm sure you will pick it up quickly once you have to use it daily.
 
Anonymous
@JoeWatkins I guess it gets the job half done then :) but really interesting thing to do. I have some unorthodox use cases for it. Shame though it can't deal with multiple variables of same object.
 
Anonymous
1:35 PM
@Patrick I always go for internship, I find it comfortable to work while letting others know you are there to learn.
 
I want to insert a record of uploaded image to three tables at once. I use MySQL. How this is done ? Google as SO had no help for me.. so far.
 
Just need to remember two things: "Ein bier bitte" and "scheisse". That will get you through Germany for years.
3
 
Anonymous
@Jimbo I know the first one :)
 
@sam_io the 2nd is "shit"
 
@sam_io but you earn 25% or less of what you would make otherwise...
 
Anonymous
1:37 PM
@FlorianMargaine danke
 
Anonymous
@Patrick money is not that much important. I need experience and confidence of which I have none at the moment.
 
Anonymous
Experience as in a teamwork experience.
 
@sam_io Didn't you hear about how expensive zurich is? ;)
 
one to one ralations or a JOIN ?
 
Anonymous
@Patrick yes, but luckily I have experience in living under expensive situations. My survival capacity is on par to that of the Tardigrades
 
1:42 PM
@animaacija because you should never do that
@animaacija why on earth would you store the same thing three times in a relational db? normalize your tables please...
 
Good morning
 
Anonymous
@ircmaxell morning
 
@ircmaxell morning
 
but you already had an internship? Why do another one? People usually do this because they can't find a job.
Why was the one at liip only 2 months? Isn't it usually 6 or 12 months for internships?
 
@Leigh @NikiC @bwoebi do you think once the CSPRNG patch is implemented we can silently change str_shuffle(), array_rand() and shuffle() to use it under the hood?
 
1:52 PM
@Patrick well, each picture will have description in tree languages, is_visible .. etc .. so there are three tables named gallery_lang1, gallery_lang2, gallery_lang3 .. How its done so ?
 
Anonymous
@Patrick 6-12 months 0f internship? Are you serious? Maybe I have confused internship with some other word, but here it is from 2 weeks to 2 months.
 
@animaacija normalize your database. Look up what that means if you don't know. You want one table with all the information and then a foreign key like language_id
 
Internship is praktikum in german? (not 100% sure)
Do you mean "schnuppern" (as in trying out a field to see if you like it)?
 
Anonymous
we call it here ''stagiaire'' or ''period d'essai" I think here it is more like giving your employer-to-be a good enough impression so that they can hire you. @Patrick
 
2:00 PM
@Patrick that's why there is no information online. Bad practice is not so popular.
 
Anonymous
I did one week exam with liip (with no pay), passed it then was given 2 months of intern (with pay ) which I did not perform well. But this was 2 years ago..
 
@sam_io hmm I am not sure that it is common in zurich. I think you mostly have internships (which are for students to get some work experience for almost no pay) and normal jobs (but with a trial period where they can fire you immediately if you don't perform). Sounds like you want is more something like a junior dev position and not an internship?
 
Anonymous
@Patrick I guess that is the closest comparison. The only downside is that, If I realized that I am in a similar skil-setl as my coworkers I am bound to honour the contract for as long as it is agreed at first and continue to gey paid for less. That is the minor problem.
 
@ircmaxell They use php_rand() internally which is affected by srand()… But CSPRNG doesn't allow seeding. So, I'd not just do it.
 
Anonymous
In here, you do the job for free/no pay for upto a month, the your skills determine the salary.
 
2:09 PM
@bwoebi (at the behavior, not at you)
 
@Fabor ISP's network should prevent that :-(
 
@DaveRandom Fortunately Danack was around to help. Eventually he got me to send them a tracert after they accused both my routers for a few hours.
 
@sam_io and people work a month for free? Why would you do that? You negotiate your salary after/during the interview. Your salary is not determined on how you compare to your co-workers, but on your market value...
 
@NikiC not a fan of the HydratorInterface name? ;)
 
Anonymous
@Patrick it is a sacrifice people are willing to take. People like me who do not come from a university background or have little to nothing to show for. It common here, but liip being pros that they are, didn't accept my request to work for free and got paid quite well for an intern actually.
 
2:16 PM
hello
i use html file upload control
how can i show only certain extensions
because it shows all extensions which is not good
i search and find that there is an attribute called accept in input file tag
but it is not supported on IE7
is there alternative solution
 
Anonymous
Only mistake I made was joining them to soon, and consequently feel short of the threshold :/
 
please, this ie7 support is really an issue folks?
 
@sam_io ''stagiaire'' != ''period d'essai". Stagiaire is an internship and "period d'essai" is meant as a normal job position where they give you a contract for say 6-12 months but they could kick you in the first few weeks without any solid reason.
Basically even an intern could have a period d'essai lol
 
^ those definitions sound what I would have expected
You get paid, but if you don't perform during the trial period you can get the boot any day
 
@Bassem yes, the alternative is to not use IE7
 
2:21 PM
@sam_io so if you want to work in zurich (or anywhere else in the german part), look for a normal junior dev job
 
get some damn upgrade
 
Anonymous
@HamZa period d'essai here is from 2 weeks to 2 months.
 
@sam_io yeah it varies
 
user895378
Hey @JoeWatkins is the anonymous classes patch merged into master yet?
 
@sam_io that depends on the contract. I think there is a maximum though by law
 
2:22 PM
@rdlowrey no
 
@sam_io what are you doing now? Job? Internship?
 
I'm anxiously waiting for that
 
and when there's the word law, there's a dependency on the country...
 
Anonymous
@Patrick yeah, being that you are more familiar with it, and if you have any advices just ping me. I really like to find anything in Zurich.
 
Anonymous
@HamZa non. I have an offer near Milano, but looking for anything but in Zurich.
 
2:26 PM
@rdlowrey apparently no
 
I see...
 
@sam_io did you have a look on jobs.ch? If you have a decent portfolio, it should be really easy. I had 9 positive answers out of 10 applications when I was looking for my job and within a week of starting the search I had signed the contract at my current place... Some of the same positions are still open over 1.5 years later... Not many devs around I guess
 
although last build seems to be 1st march
 
Anonymous
@Patrick yeah, I have been using it for about 7-8 months. I got tree positive response from Zurich but didn't accept kindly the fact that I didn't speak german. I can't deny the fact I have permit F-politic can be an issue for some employers. :/
 
@Ocramius my company force me to generate product that work on all browsers
even if IE 2 :D :D
 
2:31 PM
@Bassem leave
 
Anonymous
@HamZa what about you? Did you finish the C/Java course?
 
Especially that colorscheme
 
@sam_io That's an old story man. I'm still studying. Helped programming a robot (youtube.com/watch?v=2I1QDTe5Jhc), created an android app to control this with sockets and now I'm creating a security CTF competition
 
@Ocramius leave what , the chat or the company ? :D
 
2:33 PM
the company
 
well wee see issues regarding "is this Spartan compatible" and "workaround for Spartan"
 
@sam_io well... yeah... did you read this? It's unlikely to get the work permission if it's not in the same canton if you are on a F permit.
 
oh and now learning some basic python
 
@HamZa it's ducks all the way down
 
@Patrick I don't seem to know that expression?
 
Anonymous
2:34 PM
@HamZa E_TOO_MUCH_PROGRAMMING_LANGUAGES :)
 
Anonymous
@Patrick yes I know. But it is doable. I can get an OK from bern.
 
@HamZa turtles all the way down + ducktyping. nevermind me... just annoyed at python for not having (native) interface :)
 
@sam_io I know. I'm kind of becoming a generalist. I'm expecting myself to dive in one of those languages when I start getting a real job. PHP is still the language I master the most from my set.
@Patrick I guess I'm still not on that level to realise python's flaws. Until now all seems cool and ok
 
Anonymous
@HamZa so with enough C you could commit to php-src already? Thats sweet :)
 
Anonymous
<-- jealous guy here @HamZa ;p
 
2:39 PM
@sam_io php-src is a waste of time IMHO at my level. Not only do I need to read about language design, I also need to get my head around php-internals. I do have some home projects in mind to see how I could for example change/add php syntax for personal interests. Unfortunately still busy with other stuff
 
what's the problem with the "weak" vs "strict" type terminology? I don't think "weak" has a "negative ring" and people will not start to ''declare(strict_types=1)'' types just because of that.
 
@HamZa you can contribute to php-src without reading internals
 
improving documentation for example, helping fixing bugs etc...
Still, I think it's better to take my knowledge to a higher level before that
 
@HamZa fixing bugs etc can be done without internals
 
@DaveRandom I think I'd let out a little giggle if the docs talked about "loose" type hints.
 
Anonymous
2:44 PM
@HamZa I am curious, can you understand the pho-src or zend now ?
 
I don't really have an issue with "weak", it's a well known term that's easy to Google
Also, something something @PeeHaa's mother something loose something something
5
 
:)
 
@sam_io I understand basic C but to understand php-src I need to read NikiC posts and probably phpinternalsbook.com
 
@HamZa what? do we have a php internals book!?
oh, it looks slightly outdated :/
 
@marcio I don't know if it's complete but it should get you started
 
Anonymous
2:47 PM
@HamZa hmm, just wandering how much time one can invest in C to understand the zend framework/engine
 
@sam_io C isn't a "big" language IMHO. Compare it to C++ and you'll see...
 
I barely understand pointers properly and I can tinker around with php's internals
 
A few concepts and you have learned C. Ok mastering it is another story :P
 
@HamZa it's far from complete and some parts are outdated, at least for me it's not very helpful.
 
@HamZa yup. especially when cheating and using php's macros + memory management
 
2:50 PM
@marcio I guessed.
@Amelia hehe :-)
@ircmaxell @NikiC any plans for an update on phpinternalsbook.com ?
 
Anonymous
on a side note, I no longer think ''mastering a language takes 10 years '' is a joke :)
 
are you volunteering? :-)
 
Anonymous
More than 2 years with php and still feel a noob
 
@ircmaxell hehe. Volunteering can be done in a few ways: proof reading lol?
 
@sam_io: yet you still get more done in the first year or so when you're not afraid to make horrifying mistakes
(note: "getting it done" is a long way from "getting it done right")
 
Anonymous
2:53 PM
True dat
 
@sam_io first language? yeah maybe. But you'll pick similar languages up pretty fast
 
aww, man, I pop in here and instantly have another book to read. #techworldproblems
 
@sam_io You are comparing yourself with the room 11 standard. Which is pretty high IMHO. People call me "master" in PHP at school yet I find myself a total beginner
sorry wrong ping
 
Anonymous
@Patrick I guess so. First time I learned php, I could not understand arrays, loops, and differentiate syntax from constructs. So, I didn't learn about JavaScript for a long time, because I thought it was a completely different thing. It did not occure to me arrays, loops functions existed in other languages aswell as in php :)
 
Anonymous
Kinda funny now I think about it.
 

« first day (1626 days earlier)      last day (3304 days later) »