« first day (1766 days earlier)      last day (3408 days later) » 

09:05
@Jimbo so am i going to get a role in tv serial ? :D
09:18
Anyone who can use Swift here?
morning everyone
@NikiC do you know why php enforces the Liskov substitution principle? Does it have to do with compiler optimization? It is the first time I noticed that PHP is forcing you to program in a defined way despite the fact that all other code that does not follow the rule works just fine.
09:36
@chozilla No, it's not related to optimization
It's just the sane thing to do
Interfaces would be rather useless if they weren't actually enforced
It feels like it is destroying my current project and i have no clue how to fix it.
You should probably just stop trying to fight it
I have something that works. why am I the one thats wrong in this discussion. :(
@JoeriSebrechts That RFC... to me that's what a compiler would do
Everyone has something that "works"
09:39
well i don't know how to fix it. because it is not broken yet.
and i don't understand the problem because everyone just says "its not working like in real life" well it does for me.
@NikiC Is there any reason why internal classes can break LSP, but not userland classes?
@tpunt They can?
Anonymous
Mornin o/
Hey Jay
@NikiC, The Reflector interface defines an export method that has a no parameters, and yet ReflectionProperty implements it with three, and ReflectionObject implements it with only two
09:42
@tpunt Likely Reflector defines export without any arginfo
Anonymous
@chozilla How's the game going?
@NikiC Ah, fair enough
Hi @chozilla
@Jay i am stuck for the last 5 days because my code will be broken in php7 and i need to rewrite all the logic part because it is not the new php standard.
@tpunt Actually no, it doesn't. Why do you think it violates LSP?
It only adds optional args, right?
Ah, reflectionproperty doesn't
Anonymous
09:44
@chozilla Well that sounds great.
@NikiC, yeah the second parameter to ReflectionObject::export is optional, whereas it's the third in ReflectionProperty::export
@tpunt Sorry, was looking at the wrong code. export indeed doesn't define arginfo, so it isn't checked
@Jay it is bad and the Entity-Relationship-Model I am using is kind of the opposite of the LSP thing.
And that's bad -- that method has nothing lost in the interface
Anonymous
@chozilla What an absolute shitter - how long will it take you to fix?
09:48
@NikiC Yeah, I thought it was strange when I first saw it...
@Jay i think about not upgrading. but first i want to understand why everyone thinks it has to be in that one way.
Anonymous
@chozilla You're in the right place, i guess.
I my definition a Class was never a strict Contract. You can dynamic setters getters and callers all over PHP. It was a Contract that was vague and got more specific the more the class inheritance goes.
That gave me the option to have command patterns that the action actors use in the domain logic to form complex business behaviors. but they depend on the right type of Model/Entity to be used.
Moneywise I have to go on with the project, I might as well just throw away my past 4 years of life when I am not able to release a product by the end of the year.
Ok guys you go on I am offline
10:09
0
A: How to merge the array value into single array based on group

Hassan AlthafAssume: $array is equal to: Array{ [0]=>Application{ [id]=>1 [name]=>facebook [group]=>mobile_app } [1]=>Application{ [id]=>2 [name]=>youtube [group]=>mobile_app } [2]=>Application{ ...

My first long ass answer.
I'm going to abandon my current account.
Once my new account has enough to chat in the chatrooms.
2
Q: Unable to show 4 products in row in subcategory/shop page woocommerce

Rahul BajajI'm unable to show 4 products in a row, I just put the filter in my themes/functions.php. Code is below: function loop_columns(){ return 4; } add_filter('loop_shop_columns', 'loop_columns',999); When I return 3, all working is fine, but when I put 4 here, it shows the grid like this: Prod...

Spotted in #WordPress framework changelog: "Fixed: Sigh, PHP 5.2 issues."
10:38
@Jay I currently work on a Tutorial for the game and a smaller game mode. So something between 8 and 12 players is working rather than 30 players on the same map.
Anonymous
@chozilla Didn't see your other message, sorry. I thought this was a personal project? Not contract work? What style is the tutorial? (Pop-ups, cut scene, text etc...)?
@Jay it is well my project I work on full time. Tutorial will be a singleplayer intro. Like the real game but you just move between 4 rooms until you end the tutorial. it is just moving, picking up things, activating and fighting.
@Jay and some things have to be explained via text i am afraid
Anonymous
@chozilla What's the aim once it's done? (Where to release it etc..)
@Jay I hope i can self host it. and find some people when things like facebook integration etc. are done.
the last project (not mine) i worked on got 5.2Mio players that way. but that where different times i guess.
Anonymous
10:49
@chozilla 5.2.. mil??
@Jay ok let me correct that. it where that amount of accounts, not players. i guess some where bots and multi-accounts and things like that.
Anonymous
@chozilla Shut the front door... That's still at least 5mil, What was it!?
2
Q: Unable to show 4 products in row in subcategory/shop page woocommerce

Rahul BajajI'm unable to show 4 products in a row, I just put the filter in my themes/functions.php. Code is below: function loop_columns(){ return 4; } add_filter('loop_shop_columns', 'loop_columns',999); When I return 3, all working is fine, but when I put 4 here, it shows the grid like this: Prod...

Anonymous
@chozilla shit the bed. How much did you do for that?
10:58
@Jay what you mean? do for what?
Anonymous
@chozilla How much did you contribute to it? Were you the main dev? - Slow reply.
@Jay I worked on travian from 2006 till 2011. I had multiple roles over that time. I did not start as an developer and was never really happy with that title. I learned a lot of things while being employed there. And I left and started my own project because I wanted to get better at writing code, game designing and understanding the entertainment market there.
i am using jquery in php file and i don't know how to give jquery variable value to php variable...please help...
ThW
ThW
11:15
@DivyeshJesadiya You don't. JS runs in the browser, PHP on the server. You output text with PHP and send it to the browser. The browser interprets the text as HTML, JS, ...
@DivyeshJesadiya For decoupling I suggest to output HTML5 data attributes. <button data-somename="somevalue"></button>. You can easily read this with jQuery, even match it using attribute selectors.
stackoverflow.com/questions/32044786/… please give me answer of that question
11:31
HAs someone a good ux idea
I have to prefix an html field with BE 0[heremyTextField]
how to setup that BE 0 the right way, it's not my label. It's a prefix.
11:42
I want to buy a domain, It wants of me a Nameserver, I have not any nameserver now, what should I put in it ?
@Sajad If you have a server, you should be able to find this info. If you don't have one, most registrars should allow you to register anyways. Otherwise, just put a placeholder in there until you have one
@Patrick aha, what is placeholder ?
@Sajad Just use their nameservers
@PeeHaa aha ! ok, then I can change it later, right ?
2
Q: Unable to show 4 products in row in subcategory/shop page woocommerce

Rahul BajajI'm unable to show 4 products in a row, I just put the filter in my themes/functions.php. Code is below: function loop_columns(){ return 4; } add_filter('loop_shop_columns', 'loop_columns',999); When I return 3, all working is fine, but when I put 4 here, it shows the grid like this: Prod...

11:49
I wouldn't even change it later
It's a bit overkill to host your own name servers for only a single domain
@Patrick ha indeed I just made that thing too
@PeeHaa my host has weak resource. anyway tnx
-3
Q: How to remove PHPUnit from a PHP source code file?

d21pI have found an open code in PHP, on GitHub. Although, it is interesting; but, I don't like it much; because, it must be run with PHPUnit. My question is: "How to remove PHPUnit from a PHP code?".

@Sajad Your host or your registrar?
@SebastianBergmann wow
@PeeHaa my VPS. I want to have buy a VPS from digital ocean, 5$ in month
11:52
Your VPS has nothing to do with your domain besides the fact your domain may resolve to the vps
Where did you get the domain?
@PeeHaa from a Iranian website
is it possible to I leave Nameserver empty now ? and fill it later ? (when I buy a vps)
There should be an option to use the nameserver of them
@PeeHaa yes there is ! I use of their name server ? (I can change it later ? because I want to buy my own vps)
You don't need to change it later
The nameservers you use have nothing to do with your vps
@PeeHaa :-) ! so what is nameserver ?
11:56
18 hours ago, by PeeHaa
@Sajad Nameserver is the thing that resolves dns requests it's not a webserver
alright, what is domain name server (dns) ? actually I know, but I should buy a dns ?
8
can any one free ?? please see this post stackoverflow.com/questions/32048440/…
The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most prominently, it translates domain names, which can be easily memorized by humans, to the numerical IP addresses needed for the purpose of computer services and devices worldwide. The Domain Name System is an essential component of the functionality of most Internet services because it is the Internet's primary directory service. The...
and feel free answer to the post stackoverflow.com/questions/32048440/…
Anonymous
@chozilla Sounds awesome. So that's where you picked up php?
11:59
@PeeHaa aha, when I buy a domain, also they give me a dns ?
@Sajad you should really google before asking here
http://stackoverflow.com/questions/32048440/how-to-make-sent-sms-log‌​-from-dynamically-created-array-keys-and-array-values
@Prakash too big and localize question
@NullPoiиteя honestly I did, I need to experience a bit. and because I don't know english very well, googleing is not very useful for me
This isn't a code writing service. — Danack 1 min ago
^ this
12:02
@Jay I picked up php some years before working on a Fanpage and sometimes reading code of our Club page where they had written everything you need to have a online community.
@NullPoiиteя wait some time, Now i am editing my question
btw i dont care ...
@PeeHaa o/
@NullPoiиteя \o
posted on August 17, 2015 by kbironneau

/* by vHorner */

Anonymous
@chozilla I get you. All sounds pretty decent though!
12:08
@WyriHaximus @PHPeeHaa hi guys, I completely understand your point of view. If only people used less AdBlock, I would have less ads.
So if everybody starts using adblockers only ads will be displayed? :)
Anonymous
Such a stupid reply..
@PeeHaa They'd just block their entire site for users with adblock.
@kelunik I don't think so. And if they do I will create my own thecodinglove with blackjack and hookers
@PeeHaa Some sites do that already. ;-)
12:12
hello all, can any one tell me which server is better for php - hhvm with nginx or php-fpm +nginx or w-wan +php-fpm
"better"
@santosh How about testing it?
@santosh Are you a hipster or a reeeeeeeeaaaaallly huuuuuuuuuuge site?
If yes use hhvm otherwise use php-fpm
@PeeHaa Do you need asc|desc or is asc for pagination of results in the API enough? I'm not sure.
Hmmm good question
12:15
@PeeHaa really a huge site
Define huge
It was pretty easy to implement, until I noticed that my next keys won't work in the other direction, because I have LIMIT $limt + 1 and unset the last result and use it as next cursor.
How many (concurrent) clients do you have and what's the average page size?
@Jay, thanks for motivating me ;)
@PeeHaa at least 100000 unique visitors daily
12:17
That is not that huge
100k unique visitors daily isn't huge?
Grrr… I confused in_array parameter order :'-(
@bwoebi @salathe's plot to increase php.net views counts
@bwoebi and never forget the 3rd parameter.
@kelunik Yeah thinking about it I don't think I personally need it
you mean lxr.php.net? :-P
@FlorianMargaine don't need it in most cases
12:18
@bwoebi Just have everything as keys and use isset, didn't have those problems in the last time. :P
@FlorianMargaine Well it depends on the second question I asked
@bwoebi it's faster to go to php.net/is_array than looking up lxr.php.net...
@PeeHaa but if we consider high performance web server then it will better i think so
@kelunik Oh, we can have arrays as keys? That's news^^
@FlorianMargaine not if I have lxr open, but not php.net ^^
@bwoebi 'course bud, [(string) $arr => $foo]
12:19
@FlorianMargaine (string) $arr === 'Array', lol
@bwoebi so?
still works :D
@FlorianMargaine [@(string) $arr => $foo] ;-)
haha
@kelunik lol
@kelunik reminds me of $arr = [@foo => 'bar']; print $arr[@foo];
12:20
@FlorianMargaine You are one scary operson :P
@santosh What is the site in question?
@PeeHaa any how we are using a web server then why not we use better one
@FlorianMargaine we had symbols before rubyists even thought of them
@nikita2206 thankfully, lisp thought about them first
Anonymous
@chozilla As long as you dedicate all of the success from this game to me, I don't mind...
which could be said for most languages features
12:21
@santosh Do you know how to install / maintain and work with hhvm?
@FlorianMargaine doesn't matter, still ahead of ruby
i know how to install and use nginx +php-fpm but i have not tested hhvm and w-wan
@PeeHaa
And what is that huge site of yours?
Url
@PeeHaa NDA
@PeeHaa DNA
@PeeHaa MDMA
MDMA \o/
12:24
junkie
Guilty :)
@PeeHaa I think we definitely need it for messages, so you can crawl all messages from the beginning or from the end.
@PeeHaa still its under construction as per my client's assumption , so i am taking care before problem come and if problem come then at that these all install and uninstall process will take some time so that i am taking care from first day only
So basically the actual number of users is 5 - 10?
more like 1
12:27
@PeeHaa its 0 (because its not active (still payment pending from client side)
javascript payment?
dude, never trust the client
So that number is pulled out of your arse (pro tip: that's the case in 99% of the cases when people try in number like that)
@FlorianMargaine hehe
@FlorianMargaine ok thanks for your kind advise
lol
you're welcome, that will be $350
12:29
@FlorianMargaine You don't take BitCoin? Savage!
@santosh you're not going to pay me? That's why I never trust the client.
@Machavity only ca$h baby
"when people try in number like that" Wow @PeeHaa much Engrish. Such sentence
That's the case when people try in number like that!
@salathe I don't even know what words I wanted to use there :P
12:38
@FlorianMargaine take this $350 , i think you got, now i think you can trust on clients also
Extra confusing when women wear something that requires looking at their boob area. To look or not to look.
Always look, even if it doesn't require you looking there
Equal rights for all! If I can stare at @rdlowrey's chest I should be able to stare at any womens!
11
12:54
mroniong
ThW
ThW
@Gordon Morning
Question: php7 changes foreach so that array pointers are no longer moved forward when iterating. that doesnt apply for actual Iterators, too, does it?
I think the changes were just for foreach....
@Danack yes, but since you can foreach an interator …
13:01
lol @tereško
@Danack I did a quick test on 3v4l and it seems to apply to arrays only
just want to make sure before I need to rewrite code in six months
ThW
ThW
@Gordon I don't see how it could apply to iterators. Here is no generic pointer/position.
@tereško E_RETARD
Hurdurrr, 2x2.0Ghz = 4Ghz
@bwoebi Did you already have a look at phpdbg coverage and closing } reported as executable?
@kelunik it's the final return being placed at the last line
One could change the source and put that final return on the same line as the last opcode
13:14
@bwoebi hm?
@kelunik the implicit return NULL;
@bwoebi Then that has to be removed.
@kelunik I don't know if it's implicit or explicit when looking at the ops
@bwoebi Just remove it when you have another return right before the implicit one?
@kelunik the issue is still in functions without return value
13:19
Just run coverage with opcache
@bwoebi But it's already a lot better than the current one.
@kelunik I'm just saying that it's a half fix.
I want a complete fix
@Danack Of course, due to the medium by which this message is being distributed, only the crappy programmers will ever know
basically ignoring the final return in case there's a return right before it
But can't tell in case of void functions
lxr.php.net/xref/PHP_TRUNK/Zend/zend_compile.c#4878 … only thing I can do here is CG(active_op_array)->last ? CG(active_op_array)->opcodes[CG(active_op_array)->last].lineno : decl->end_lineno; \cc @NikiC
@TanMath @benlevywebdesign vindication btw.
13:37
@bwoebi Can't you just always ignore the final ZEND_RETURN, since one is always generated?
(unless it isn't?)
@DaveRandom … except that it will break with opcache then
@bwoebi ...so presumably the only viable solution is a new opcode for the implicit return, which means the ship has sailed until 8?
@DaveRandom Don't think that's a good solution.
Well, we could also submit a patch to php-code-coverage and set all lines with only } and whitespace as non-executable.
How bad of a person am I when I commit new changes to an existing tag in svn?
13:43
@PeeHaa time to go to church xD SHAME!
@bwoebi Why not? Unless you ad an extra member to the opcode struct that indicates whether it was generated or not (waste of mem as would basically never be used for anything else), I can't see any other way
@PeeHaa You'll probably be sent to Hell v 6.21.4232
@PeeHaa A really, really terrible person. But that's really just because you are using SVN.
@kelunik yeah, that's the best solution I guess
because these lines internally actually are executable.
Or, as said, move the final return up to the last line with code:
18 mins ago, by bwoebi
http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_compile.c#4878 … only thing I can do here is CG(active_op_array)->last ? CG(active_op_array)->opcodes[CG(active_op_array)->last].lineno : decl->end_lineno; \cc @NikiC
13:45
@bwoebi It is in the last line.
@kelunik with code.
With opcodes/instructions I mean…
I have ofc searched this, but nothing seem to come up, but my php error log is logging everyingthing twice. my php.ini has the settings

log_errors = On
display_errors = Off

Anyone know what it could be?
@bwoebi How?
@kelunik ??
function foo() {
    return 0; // executable
} // executable
13:46
yep, move the implicit return in the line of return 0; I mean
good morning
so that the line with } isn't containing any opcodes
@bwoebi Oh internally, yeah, that's probably the best solution.
yes, sure
I'd just like to know what @NikiC thinks about that
13:58
@Ocramius Do you have any advice on how to get CodeSniffer to not complain about labels for goto's not being indented?
\o/ going to true north \o/
@Danack I don't even know if they handle TODO :|
sounds like a bug/missing feature
@ErikLandvall are you entirely sure that it is not because you are running every script twice?
@tereško well, I'm accessing it from the browser through apache in a docker setup. I don't see how that could have happened. the script it self is just one line that throws an exception for this pupose alone
so, you havent actually called a simple php file containing <?php error_log('test'); from command line
because what you describe there had at least 3 possible sources of that behaviour and non of those use php.ini file
Good morning
14:06
sorry for not replying, I'm trying to do it via the cli in the docker continer .. it takes some time, I'm a docker noob :D
posted on August 17, 2015 by kbironneau

/* by DannyFeliz */

remarkable
truly remarkable: github.com/…
@Ocramius This is possibly a conversation for the pub - how do you handle/avoid the code sniffing rules from making you write code that is worse from a technical viewpoint but that conforms to the CS rules?
As an example - labels really need to be at the start of a line....but if I want to conform to CodeSniffer rules apparently they can't be.
@tereško idk, you right, it doesn't log it twice from the cli.
14:11
@Danack I exclude files from the CS rules
tools are tools, you can please them, but they also have false positives, eh
@Ocramius Wordpress: resistance is futile
Good morning.
Anonymous
@LeviMorrison o/
@tereško if I look in the access log I see that it's trying to access /favicon.ico .. wich dosn't exist, but the htaccess is probably serving the index file anyway.. hence the dubble logging I guess..
Anyone know of a good way to check parody bit for 7 bit encoding?
What I got so far is 3v4l.org/oZ8kB but I wouldn't be surprised if I'm totally wrong
14:15
@Orangepill You mean parity? ;)
@bwoebi I still think you should run with opcache
This is a problem caused by us not doing DCE
@NikiC I don't think that requiring opcache for sane coverage is a reasonable option.
There are cases where that line is executable and you'd be marking it incorrectly
@Machavity that would make more sense wouldn't it :)
@NikiC hm?
14:19
@bwoebi Assuming correct control-flow analysis and a non-void function, an uncovered closing bracket indicates that you're missing an unreachability annotation for complex control flow that can't reach the end of the function for algorithmic reasons
It's like the C compiler throwing a warning about "control reaches end of non-void function"
@NikiC actually, I'm always marking the line as executable when it can be reached
@DaveRandom @Fabor because you had some interest in it: blog.bitbucket.org/2015/08/17/…
The issue is just that they complain the line containing the closing } is marked as executable in case of a void function
@bwoebi Are you?
AFAIK, yes.
14:23
I don't think so
At least I don't see why the last opcode would necessarily correspond to the control-flow branch containing the implicit return
E.g. it could be something like a backwards jump for a loop, maybe?
actually, I'm not sure.
@Machavity got any comment on the sanity of my approach ... seems rather verbose for what I would assume is a common low level operation
What's the correct way of doing this:
UPDATE foobar SET isset($_POST["foo"]){ foo = :bar }, isset($_POST["foro"]){ foo = :bar }, isset($_POST["foroyo"]){ foo = :bar }
@NikiC and what's the fix for running it without opcache? :s
I've looked into SQL appending, couldn't find anything helpful. Do I even need that?
14:32
@bwoebi Accepting a result that is suboptimal in one way or another :/
48 mins ago, by bwoebi
18 mins ago, by bwoebi
http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_compile.c#4878 … only thing I can do here is CG(active_op_array)->last ? CG(active_op_array)->opcodes[CG(active_op_array)->last].lineno : decl->end_lineno; \cc @NikiC
@NikiC ^ but this isn't an option?
It's an option
Not sure if it's the right one
Anonymous
damn, I just found a guy who does not know the Internet :/
> IMO, `set_exception_handler()` should be changed - with my preference it not
> capturing `Error`, and instead have an additional `set_throwable_handler()`
>
> http://news.php.net/php.internals/87766

<3 Derick (fuuuu markdown)
@samaYo as in "doesn't know that internet exists"?
Anonymous
14:50
@tereško Nope, I gave him a site's url to help him learn something French. He pulls out his phone and asked what to do, I said "check it using your internet" and goes and opens his android facebook app and asks what to do again.
Anonymous
/ this guy only uses fb on phone, he though the internet was the fb app
@Orangepill I wish i did but I've not messed with any bitwise stuff
Is there any built-in way to recursively load files matching a pattern with composer? Something like "files": ["**/functions.php"]
Or do I need to write an extension for that?
I prefer to stick my functions.php files per-namespace in their appropriate directory.
@DanLugg So do I. As far as I know you have to explicitly include each.
functions.php looks like such a bad name
like "utils"
14:53
functions.php is pretty descriptive of what's in the file.
I expect this kind of file to have 10k LoC
@Trowski yeah, as much as "all.php"
@Trowski code.php
php.php
magic.php
asyncsaucezOMG.php
Used appropriately, per-namespace as @DanLugg suggested, containing only a few functions relevant to the namespace, I think functions.php makes sense.
14:55
^^ That's all I use it for.
@Trowski I actually agree, was just being facetious :-P
Seems monday is a day everyone has his bad days... stackoverflow.com/questions/32053503/…
@Trowski technically, I disagree. In practice, I do it too.
Anyway, composer doesn't support this sort of glob-loading out of the box, I assume.
@DanLugg this (imnsho) is getting to be a problem already. A significant number of libraries are including all the functions they might possibly require, and so each request has a sizeable amount of stuff that gets loaded that is never going to be used.
14:56
but my practice is bad
@Danack ns?
@Danack Fair enough, but we don't have function autoloading.
not so
@DanLugg don't we? @ircmaxell has talked about it so much that I don't know anymore
@FlorianMargaine File-per-function is also a possibility.
File-per-function gets a tad unwieldy though
14:58
@FlorianMargaine 'not so' aka I know I'm pretending to be an authority on the subject.
It would be nice if the autoloader was called for functions. Perhaps the autoloader function could have a flag added that told you if it was a class, interface, trait, or function.
^^ You're quoting @ircmaxell circa ~8 months ago, right?
;-)
Am I? Then that idea is probably worth pursuing :-)
@Ocramius it was from the presentation from coderabbi at Laracon
@Trowski wiki.php.net/rfc/function_autoloading and by 8 months, I mean 20-something months
14:59
@prograhammer yes, the keynote. Talmudic Maxims, iirc
Yeah, I've not been a great example lately tho :P

« first day (1766 days earlier)      last day (3408 days later) »