« first day (1657 days earlier)      last day (3516 days later) » 

00:02
@marcio requires the multi-typehinting and multi-returntype to be implemented first imho
class Foo implements Baz<A>, Baz<B>{
    function bazMethod(A|B $aOrB) : A|B{}
}
interface Something<T is NULL | Foo>{}
that or method overloading but i don't think it's a good idea in a dynamically typed language
java also has the & anyway, so ideally:
interface Something<T is NULL | Foo | (Baz & Rofl)>{}
but this is not essential
cc @LeviMorrison
interface Something<T is NULL | Foo | string | int>{}
btw levi i started writing .phpt for this (not the generics, just the multitypes) the other day. i paused but if you believe it's worth it i will continue. i really want to help :)
interface A{ function x(Baz $x); }
interface B{ function x(Bar $x); }
class C implements A, B{ function x(Baz|Bar $x){} }
interface A{ function x(Baz $x); }
interface B extends A{ function x(Baz|Bar $x); }
00:46
@Worf orthogonal IMMO, but my opinion doesn't matter a lot because I'm not a big fan of generics for a lang like PHP
@LeviMorrison yea, who is the room11er working on generics?
@marcio $generics === $gold
how's the story with declare() ? are they related to the file or can they have their own scope?

<?php

declare(foo=1){
namespace A{ ... }
}

declare(foo=2){
namespace A{ ... }
}
i'm using nikic's php parser and i'm not sure how i should skip the declares in a future-compatible manner
@Worf if I remember right, the declare block is not allowed for strict types
but how about other declares?
00:56
allowed
@Worf what are you doing?
a proper phpdocumentor thingy :P
3v4l.org/Ynoej so this fails now but it's valid technically
hummm, phpdocumentor sucks
yeah
i use apigen, but i think i can do better :D
@Worf namespaces must only be declared on first level: E: 3v4l.org/LDDgV
* ignore HHVM, it fails to mimic PHP genius :P
declare doesn't introduce any scope that is what i was trying to understand
so apart strict types declare, where does the declare gets applied to?
01:05
@Worf declare has no scope 3v4l.org/Qnsvl
@Worf only ticks and encoding
i mean, ticks are per-process, not per-file, right? encoding is per file, same for strict types
makes no sense having two declare(ticks=) correct?
@Worf you should account for both per file and per block declaration
but only poor souls use it, the person who created "declare()" might feel guiltier than the inventor of pop ups for the internet.
lol
ps: dunno who "invented" it, hopefully doesn't hang out here
01:33
wtf so declare(strict_types=0); in the caller file overrides the declare(strict_types=1); in the definition file
i didn't understand it was going to work this way
#depression
@Worf why do you think that is bad?
because i implement my code relying on strict types, if one can override the behavior from the outside makes the strict scalar types pointless
@Worf your code will still have strict types - the setting is per file.
so basically i still have to check with is_float is_int
@Worf no.
function(int $foo) {}
foo will always be an int inside the function - for both strict and weak types.
01:48
I'm going to have fun tomorrow with language parser… mhm…
@Danack. create file foo.php, put this in it:

<?php
declare(strict_types=1);
class A{ function test(float $a){}}

then create baz.php

<?php
declare(strict_types=0);
require("foo.php");
(new A)->test(20); // will this fail?
@Worf No, but because both weak and strict allow promotion of ints to floats.
But doing var_dump($a) inside the function will show it to be a float.
aaaaaaaaaaaaah #phew
i thought that nothing changed xD was heading to the bar already
basically it's "it's supposed to be an integer, if you pass in a float it's your fault and idgaf"
btw you can test this in 3v4l - 3v4l.org/D9PBk references 3v4l.org/CBEkF
<!-- don't we all love when kernel updates and kmod-VirtualBox gets behind -->
01:59
cooool didn't know that :D
@Danack :O
just :O
Magic.gif
instant Gratipay
8
02:30
Does anyone have a effing clue what Yasuo is going on about?
> There are systems that has "32 bit PHP client that queries 64 bit server". Many IoT devices will stick to 32 bit CPUs.
03:03
He may have a point there - but his solution is nuts...
> So what you're suggesting is adding a numeric type that acts like GMP
and allow arbitrary precision arithmetic on values? Isn't that just
GMP? Except you'd need to convert the variable to be 'numeric' before
doing any operation on it i.e. something like:
Primitive types can't represent all data types. If you need to do that, you need to stop using primitive types and start using decent types.
yes, obviously he has "crazy" requirement that can't be solved with string| integer|numeric
no, actually he wants a numeric string type xD
Well arbitrary precision integer math.
03:54
Does anyone know how to use FOUND_ROWS() on multiple tables? Here's my query:

DB::fetch("SELECT FOUND_ROWS() as `total` FROM `products` t1 RIGHT JOIN `homepage` t2 ON `t2`.id = `t1`.id;");
It's not returning the correct amount of rows
04:17
@mightyspaj apparently you need more syntax in there - dev.mysql.com/doc/refman/5.0/en/…
> In the absence of the SQL_CALC_FOUND_ROWS option in the most recent successful SELECT statement, FOUND_ROWS() returns the number of rows in the result set returned by that statement. If the statement includes a LIMIT clause, FOUND_ROWS() returns the number of rows up to the limit.
 
2 hours later…
06:02
Hi i have a problem in php date function
my code
$startdate='1870-02-11';
$newstartdate = date('Y',strtotime($startdate));
echo $newstartdate ;
it returns 1970
what's wrong in this code?
i want to return 1870 for this code
can anyone explain me?
what i'm doing wrong
??
0
Q: joomla 3.0 login return url

Prabhash RawatI have create a button to redirect to page but i want to redirect only when user logged in if user not logged in then user redirect to log in page after successfully log in user redirect to previous page, i have used this small code for doing such thing $user =& JFactory::getUser(); if($user->id...

@Boopathi, php date is not supporting less then 1970 try this:
$startdate='1972-02-11';
$newstartdate = date('Y', strtotime($startdate));
echo $newstartdate ;
@Rafiq oh ok ok thanks. but how can i convert that?
do you have any idea?
what you mean by convert?
i want show year only from dates
have you got my point? @Rafiq
06:16
1870 is earlier than strtotime can convert
he strtotime() function parses an English textual datetime into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 GMT).
That's why 1870 won't work
okay okay. any possibility to get year only from below 1970 dates
@Epodax
No idea, I only remembered the 1970 thing because it appears quiet often in questions with php / date();
@BoopathiRajan , it's not professional but what if you use:
$startdate='1870-02-11';
$rest = substr($startdate, 0, -6);
echo $rest;
@BoopathiRajan $dt = new \DateTime($startdate); echo $dt->format('Y');
@Gordon Just out of curiosity, why the \ before DateTime?
06:21
@Epodax because it's a class from the global namespace
Ah, right, Thanks
@Gordon it shows "2015" for all dates
@BoopathiRajan you startdate is not what you say it is
@Gordon sorry bro. it's my fault. i got results successfully. thanks a lot.
@Epodax @Rafiq thanks you :)
06:36
:o I left my pc on overnight ...
Dam dam dam
06:53
moin
hi
anyone comfortable with nginx here?
07:11
0
Q: Router for personal use

Hassan AlthafThis is router I created for use, however, I wish to refactor this code and make this more robust. I would really appreciate anyone who can: Point out how to make this code more robust, clean and flexible. Point out where code can be refactored and possibly how. Point out how the code could be ...

My question with a bounty^
Feel free to answer, I will award the bounty to a person on like 4th or 5th
hi
I have
; Log errors to specified file.
error_log = error_log;
this line in my php.ini
How can I know where is this error_log location indicates
Need some help to set up nginx with php... anyone could help pls?
@Julo0sS there are a lot of tutorials for that. Ask a specific questions if you get stuck somewhere
07:17
@Patrick I checked some, but seems like nothing working. My problem is that im comfortable with apache and not nginx, and the php_fastCGI thing seems to fail all the time. More specific, I don't understand the nginx.conf logic neither
@Julo0sS Then read and try out things... That's how you get comfortable with new things
good mornings
meurning!
any idea to solve this issue compare to two dates and get differnces in time in php
07:34
@SmartKaliDass google it or search on stackoverflow... This has been answered many times
@Patrick any working one link for me ?
@SmartKaliDass don't be so lazy
ha ha i tried more anwers but all return numbric data values i need hours and time
@SmartKaliDass Or maybe even just browse the section of the PHP manual called "Date and Time related functions"
@SmartKaliDass oh so you can't just copy and paste but you have to think too? Poor you :(
07:45
Does someone know PHPExcel?
@hy0shi Did you mean "Does someone know the answer to my question/problem on PHPExcel which I haven't stated yet?"
No
not really
I wanna know if someone have experimented using phpexcel otherwise it's useless to discuss
it's useless to ask questions without the question part of the question
boring cya
@Patrick Ok. Well, I read, again and again. But my problem seems more specific now ;) I'm tryin to configure nginx to work WITH apache at the same time. What I want to set up is to use proxy_pass for my nginx in order to use the apache php. BUT cannot find any "easy" or "step-by-step" thing that works for me
07:49
@Julo0sS why do you want to run both?
People are snappy today
@Patrick why not? I have a big apache server mounted, maybe i will turn to nginx later, when im comfortable with it, but in the first time i want to keep my apache
moin again
Why not make a duplicate dev server and run nginx on that?
So you can test / play with it untill your ready to swap?
Mornig
07:53
@Epodax this is a good idea. didnt think that running nginx "with" apache would be such a mess...
hi @PeeHaa
I don't think nginx and apache was ever ment to run together.
@Julo0sS You could run it on another port I guess, but if you want to try it first, +1 for another server
As far as I understand it's abit like trying to make windows and mac run at the same time
@Patrick I ran nginx on another port. All looks fine for HTML only. url:8111 gives me my index.html. But need some php. Thought it would be easier to proxy_pass the php to my apache php
@Epodax lol
07:56
Guys can you say this; A syntax error is an error thrown when the rules of a programming language is breached.
*when a rule of a
@HassanAlthaf A syntax error is an error thrown when the rules of a programming language is breached.
There I said it
My computee science text book is not at all student friendly
we have to construct our own definitions based on the explanation given
:/
hm sure @Patrick
i neeed to know more
07:59
good moonrings
anyone here knows how to deal with event dispatching between domains?
too general @Hassan
mention grammar
"when a programs source cannot be parsed according to the programming languages grammar" or something like that ...
mornings
08:20
@JoeWatkins I am doing my ordinary levels, ot supposed to use terms like parsed lol. Already got scolded for using words like abstract
@HassanAlthaf s/parsed/validated/
@LeviMorrison If you replace that func_get_args() with $iterables then yes :)
(Of course both work, but if we're using variadics might as well use them ^^)
There's also the subtle different of yield from not supporting plain (non-Traversable) objects, but I'd consider that a plus rather than a minus :)
Morning
which one more secure and realibel hand made php cms or ready made cms
posted on April 30, 2015 by kbironneau

/* by Boppel */

08:34
I didn't know there were any machine made cms systems out there
Looks like I finally setted php + nginx ok. BUT I get "connection was reset" on my pages
Not going for the seperate dev server?
@Epodax not now, but this config is seperated from the apache server. I setted a php into the nginx folder, which is running only for nginx.
ports are different, only common thing is the www folder
1st thing, when I try to reach the nginx folder without giving him a filename (setted it at localhost:8111), then I get 403 forbidden error.
If I try localhost:8111/index.php, it works
If I reload page, i get "connection was reset" from my browser
and I have to restart php-cgi.exe to make it work again
this s*cks :(
08:51
@Julo0sS Pro tip: there is no such thing as "setted"
@PeeHaa ^^
I 've put php in nginx folder ?
09:09
A lot of interesting news coming from MS camp
thinking of win10 with the ios / android apps?
morning!
morning!
09:25
morning!
o/ guys
09:41
morning
Anonymous
morning
@Naruto I wasted my precious 2 weeks on that shit thing called your nickname. :D
@Leri I know you like watching me in your free time ;)
@Naruto Actually, I did not watch, but read manga. It was such a waste...
Anonymous
@Leri death note
09:46
@Leri damn you, I will just have to punch it into you ;)
@samaYo I have watched it and it's the only anime I like
Anonymous
same here, and spirited away. if we can call it anime
There's lots of good anime for every person. Just need to find your type.
hey - anyone really good with ubuntu and setting up sphinx search? :D I manage to get sphinx working ok but running into some odd behaviour while doing that
@samaYo Isn't that a film with horses in it?
Anonymous
09:52
nope
Anonymous
that is spirit i think
I still configure nginx, I get a 404 not found error when I try to get to a specific page. Problem seems strange because when I look in the console, i see 404 not found, but I see the response which corresponds to the requested page content... So, seems like page exists, why this 404?
Theres a anime about horses? O.o
Anonymous
lol
Anonymous
@Julo0sS check your permissions
09:55
@samaYo its windows^^ x)
no perms
I get the page content (see it in console)
but see "NetworkError: 404 Not Found - localhost:8111/index.php";
Anonymous
why use port 8111?
Other ports used ;)
url : GET index.php / Status : 404 Not Found / 14.4Kb (oO)
and when i look at the server response, i see the page content
guys erm, I'm getting a "Error 1: DB Error: extension not found" error on my local host (when I log in to the system). The problem is nothing is getting reported to my error_log. Is there anything I can do :S
are there any good PHP code generators, preferably written in php?
Anonymous
@Brunaldo what extension does it say is missing
Anonymous
10:01
mysql, pdo ...
Goddamnit. PHPstorm is a proper piece of asshole. cc @DaveRandom because he sucks
it doesn't say the extension. that's the problem lol
@samaYo
@PeeHaa What up briz?
Anonymous
better check your error log, both for nginx and php @Brunaldo
@samaYo nothing is getting reported to my error_log(s) and I have no idea what nginx is
10:09
@Jimbo I am trying to exclude directories in my project because that piece of shit keeps indexing stuff for hours and hours. Can you guess what it does when excluding directories? It starts to fucking index again :|
0
Q: Seek peoples attention without a bounty

Hassan AlthafI basically am suffering at CodeReview section where people don't answer/review my code unless I put a bounty. Well even a bounty gets me a small answer from barely one or two people. Any remedies?

@PeeHaa LOL. Must be a big project, and we've got 4 mil LoC
@Jimbo Yes it is a huge project. :(
Anonymous
Well, I can't help you more. Running nginx and php in windows is kinda new to everyone here @Brunaldo
@samaYo Honestly, if you can get off windows and learn a bit of ubuntu... you'll save yourself so much time in the future. Once I'd made the change, it was like I'd levelled up IRL
10:10
i'm on ubuntu btw @samaYo thanks anyway though.
22 messages moved to bin
lolwut, now I should go back to my assembly assignment
3 messages moved to bin
No you're ruined
PHP is the best room.
Anonymous
@PeeHaa stop removing everything pls
10:15
@HassanAlthaf No it isn't
yes its filled with indians and pakis
the gif bin is?
i am off bye
yh he is in teresting
@samaYo Why?
Nothing of value is lost
10:15
@PeeHaa the super mod
*interesting
@PeeHaa wayyyyyyyy better than Java
@lovetolearn with that attitude, the average paki/indian might be more competent than you
@HassanAlthaf Yeah holy cow it is java is slow
@PeeHaa and their attitudes.. holy cow..
@HassanAlthaf Really? I never have issues in there?
10:18
They just freak me out
I rage quit their room
Nope, friendly room. Never had any problems. I even joined some of their hangouts
Yeah that's exactly how I know them
They are not noob-friendly like PHP room
Although @unihedron is an asshole :P
omg yes him
10:20
He's ok :P
*they are not php-friendly like the noob room
Let me test it
in Java, 23 secs ago, by PeeHaa
Your language sucks! PHP FTW! IT IS GREAT AND DOES ALL THE THINGS!
Nginx again... : Why does root/index.php is working fine, and root/subfolder/index.php is returning 404 ?
All they did was made fun of me due to the fact that I came from Java background..
*from PHP background
10:22
I would laugh at you too
@FlorianMargaine Laughed / cried. All the same :)
@HassanAlthaf in the Java room on Stack Overflow?
@PeeHaa have you got to the bottom of why that directory is problematic?
You can contact jetbrains if you are having real problems, they are generally pretty good at support
@DaveRandom No. I thought it was ok once it finished indexing. However this morning the thing started all over again
There must be something in there that's causing an issue - I've had it take 30 secs or so to index v. large projects before, but never had issues with it never ending unless I did something stupid
10:25
can someone suggest a nice package for building cli apps? does symfony/console has a better alternative?
Although I know that when I've had to exclude dirs I have had to dump index caches and restart to sort it out
@SergeyTelshevsky Would it help if I told you that I've got a nice package?
@SergeyTelshevsky I think the pleague has climate
@MadaraUchiha yh
@DaveRandom :-)
@DaveRandom gimme gimme :)
10:27
@HassanAlthaf I'm active there, I call bullshit.
@PeeHaa nice, will look into it
Not sure about the niceness of it, but pewrhaps worth checking out and reporting back to us :)
mhm, I've seen there are really good packages in plague, but there are complete nightmares as well
@MadaraUchiha what do you mean.
@HassanAlthaf It means that the people in the room are pretty nice. please provide a link where they misbehaved against you.
10:30
@MadaraUchiha its like a week old
or even more
Hi can someone help me how to clone git using private and public keys? I am new to git
use PHPstorm
Awesome IDE, Github friendly
Yeah because it is great and indexes all the things :P
@HassanAlthaf Yeah, no.
@prdtuty linux? windows?
@Madara
10:33
@MadaraUchiha pardon?
windows
@HassanAlthaf If you only know how to use Git through the IDE, I feel sorry for you.
@prdtuty google for GitHub GUI Client
Go learn the CLI, like right now.
@HassanAlthaf NO.
@prdtuty Have you already downloaded Git?
10:34
I do linux CLI; my server is CLI
i did learn a few cli commands
@SergeyTelshevsky It probably won't help you write a CLI app...
This will help you generate your keys, upload them to github, and sync a remote repo
I have to go soon, if you have questions, just ask them in the room ;)
@MadaraUchiha Thanks a lot!!!!
10:36
@DaveRandom is there some joke behind that? :)
@MadaraUchiha weren't you there in the 2nd Monitor room
@HassanAlthaf I am everywhere, and nowhere.
Parser conflicts -.- (name &$variable) ~> $variable … well … yeah… reduce/reduce conflict due to name either being interpretable as constant and the ampersand as bitwise or as classname + by-ref param
lol @MadaraUchiha
So, this crazy ~> ... what's this about?
10:40
@NikiC any suggestions to that problem? Current rule is '(' parameter_list ')' T_TILDED_ARROW expr
PHP7 is going to be a completely different language almost.
@MadaraUchiha are you the night?
@SergeyTelshevsky It's a penis joke. I'm tired, you'll have to bare with me.
@Epodax I am the being you people refer to as "The World". And also "The Universe". And also "God". And also "Truth". And also "All". And also "One". And I am also yourself.
@Jimbo haha
10:42
anyone for the nginx 404 in subfolders?
@MadaraUchiha tired of your previous nickname? btw, what about the moderator election?
@Julo0sS Yeah, and I didn't get elected
(Otherwise I would have been blue now :P)
sorry 4 u... i did my best to help^^
Thanks ;)
@MadaraUchiha uh, well… If there's one GUI which can do filter-branch commands for me … and has a nicer interactive rebase mechanism… I think then it might be useful.
@bwoebi Definitely.
Not without knowing how it works underneath first though.
10:44
I use this script to make cross domain proxy. http://www.abdulqabiz.com/blog/archives/2007/05/31/php-proxy-script-for-cross-domain-requests/

I want to add a header for cross domain origan what I need to add?
Thanks
Otherwise you end up with people knowing how to jQuery without knowing how to JavaScript
I don't want to know how filter-branch works underneath… oO
Apr 25 at 7:45, by PeeHaa
http://pastie.org/private/ghqv1dwwd0chggtvlwcl2w
@MadaraUchiha really… some git command are everything… but easy…
@bwoebi It's fairly simple. Although admittedly I've never seen the need to use filter-branch.
@bwoebi You don't need to know that much...
clone, add, commit, pull, push, branch ,tag
Those get your about 90% of the way there
10:47
@MadaraUchiha It's simple… well… except you want to do a specific thing which just isn't easy.
rebase and cherry-pick is another 9%
SCratch that btw @Alon. That is something else
The other 1% you don't really need.
Also needing fetch
@bwoebi Yeah, fetch and merge too
It sounds like a lot, but it's like 2 days of learning/practicing the get the hang of it...
Then tools like the IDE can take over.
10:48
@MadaraUchiha except you notice at the end that you put sensitive data in your root commit, just before pushing…
tell me how I would solve that :-D
@bwoebi And how would you do that in an IDE?
Like I said, all those tools get you 90% of the way there
@MadaraUchiha in an IDE? no idea…
You need to do a little sweating to learn the other 10%
@HassanAlthaf Ask a good question and you'll get answer. I have never had that kind of problem.
Then there are specific commands like git subtree
10:50
@peeHaa I think that it dont work
Needed that for a while while working in phpdbg in github branch and in php-src
@MadaraUchiha yeah… but the other 10% are just ten times harder than the first 90%
I use this script to make cross domain proxy. abdulqabiz.com/blog/archives/…

I want to add a header for cross domain origan what I need to add?
Thanks
I think that I succes to put the headers but it make all the http request to the proxy www.exmple.com and not for www.exmple.com/proxy.php

« first day (1657 days earlier)      last day (3516 days later) »