« first day (1771 days earlier)      last day (3181 days later) » 

4:00 PM
not sure, but I don't think that's appropriate at this stage
 
I didn't understand that either
I feel like the whole discussion was a sham
 
> These look like they can be handled separately, what they have in common is
> - definition of Error and Exception use case
> - further development of the exception hierarchy
 
I think both should be handed post-7.0
 
I think that's what he wants in a RFC, a clear definition of error / exception.
 
as they will be bike shedded to death
and I think doing that now will 100% guarantee it won't make 7.0
 
4:04 PM
Hello everyone, these anyone knows about apache folder alias and mod_rewrite. My website alias folder url is taking root files not the alias php files so the mod_rewrite is opening the root websites not the alias folder website. Can anyone help me with this please. Thank you!
 
@ircmaxell Yeah, unfortunately.
 
4:38 PM
@kelunik we might end up getting rid of that distinction of course
 
Damn, this movie is awsum af
 
Anyone with apache experience?
 
@Andrea That sounds unlikely at this point
 
@NikiC I don't mean in 7
 
@Andrea It's even more unlikely afterwards
 
4:53 PM
Guess so.
 
@FranciscI.B What help do oyu need?
Damn, this sudden rain ruined the movie! :(
 
@Andrea I don't think so.
In a perfect world, we wouldn't need such a distinction, but a lot of people fail to hide their internal dependencies, especially when it comes to exceptions, so the consequence is catch (Exception).
 
:/
 
Attention pls
 
And because of that, I'm glad that we have this distinction, that way people do not catch programming errors resulting in Error or a subtype of it.
 
5:10 PM
@kelunik On the other hand, this also has very far-reaching consequences about exception usage. Much further reaching when anybody was aiming for when BaseException was first introduced.
In particular, a large fraction of exceptions (maybe even more than half) should now be thrown as errors instead
 
Yeah. That's a bit sad, but people only slowly begin to understand the issues with that dual system shift... :s
 
@NikiC Sure, but that's something which is solvable in the future IMO. We can introduce LogicError etc. in 7.1 and deprecate LogicException etc.
 
not saying that system is bad, but as Nikita says... Far reaching consequences.
I'm annoyed by these who loudly always shout BC break; yes, it's a concern, but not the supreme one. sigh.
@kelunik for example. And that'll be a far more long-term BC break than the issue "Fatal errors might now be caught via catch(Exception) then!!!" ....
 
IMO, it depends if it breaks working applications or breaks broken applications just in another way, e.g. throwing LogicError instead of a LogicException wouldn't be a BC break for Amp IMO.
 
Yes. The amount of code change that will be necessary to accommodate the new exception system will quite likely be larger in the long run than fixes for BC issues
 
5:18 PM
Well, it'd break every lib using these exceptions...
 
@kelunik You can't just switch to throwing a different exception
Basically what we did is just push the BC breaks downstream
 
@NikiC Sure, it depends.
 
We won't break BC, but anybody who wants to throw the right exceptions will have to
 
Basically. And that's what they didn't want to understand back then :'-(
 
@bwoebi What would have been the difference with BaseException?
 
5:22 PM
@kelunik I'm not talking about BaseException or throwable. I'm talking about the general problem with a dual exception hierarchy
basically Exception as root vs. Throwable/BaseException
 
@HassanAlthaf I have 2 websites on one domain, one is using an alias directory.The problem is that the mod_rewrite rules for urls are being handled by root htaccess.How can i fxi it?
 
Hi
:25250243
 
5:39 PM
It's dead?...
 
5:57 PM
Hi, how can i use FILTER_VALIDATE_EMAIL and FILTER_SANITIZE_EMAIL in filter_input do I need to do sanitize first then validate like this ?
`$email = filter_input(INPUT_POST,'email',FILTER_SANITIZE_STRING)`;
then validate it
`$email = filter_input(INPUT_POST,'email',FILTER_VALIDATE_EMAIL)`;

is it possible to do this in one line of code ?
 
Why would you want to use SANITIZE_STRING?
 
I apologize I was thinking that using thick in email is invalid that's why I use sanitize_string. filter_validate_email would be enough
oh my mistake ' is allowed in SANITIZE_STRING
 
@jemz sanitising is almost never what you actually need
 
@Andrea thank you
 
hmm .. time to update my VPS
it looks like freebsd 10.2 has been released a week ago
 
6:10 PM
To explain further: sanitising will remove "dangerous" content, but really this just messes up what the user typed in and doesn't help security. What you're usually looking for is either validation (checking that something is the right format, for example, you validate that something is an email address with FILTER_VALIDATE_EMAIL) or escaping (encoding text with htmlspecialchars when you output so it'll show up properly in HTML)
 
I was thinking about contributing to a phpunit component that's still in dev stability, I've made a fork on GitHub and was going to write a few simple unit tests, but being my first contribution to open source, I'm wondering if my small contribution would be more hassle than its worth to whoever has to check it before they [optimism] merge it in?
 
Hey all, What's up? There is my first message in the chat ;)
Someone need help?
 
Welcome @UnderPhp :) I've been lurking for years, pretty much my first message here too lol
 
note2self: tolling is bad, trolling is bad, trolling is bad
 
@tereško, sounds like you're trolling yourself there?
 
6:38 PM
@Jodes You'll never know until you ask an author or open a PR
 
6:51 PM
Hi, this is the value in my database
dont's

how can I ouput like this dont's with aposthrope and s ?
 
just echo it
though, you really shouldn't use htmlentities() on text before saving in the database
 
@ircmaxell Feel free to use that RFC as a starting point. Edit it however you feel is necessary. I'll be busy for a few more hours, so won't be able to work on it for a while.
 
@tereško, I only use FILTER_SANITIZE_STRING
 
@Trowski thanks
 
7:07 PM
Hey firends, I have a question about Send data with json..
someone good in ajax?
 
do you have other questions or are you just making a survey ?
 
No, there is not survey.
I am want to select data from my database with ajax request..
do you know how do is?
 
yes
thought I don't know how this will help you
if you have an actual question, please ask
stop conducting a survey
 
This is not survey!
You can get me links to learning?
I want select data with ajax and json
 
Suddenly found myself on Stackoverfloooooow
Hi all :v
 
7:14 PM
@nTuply Hey
 
Hi. I'm not good with ajax.
 
he just want someone to google links for him
 
lol
 
no
 
How to Google?
 
7:17 PM
I dont understand how to send request for get data
Ajax is no my best
 
do you have any SPECIFIC questions?
 
and sorry for my english
 
@UnderPhp Here's a link you can learn from bfy.tw/1Qdg :)
 
haha :D I know this site (:
 
@nTuply dont be a lazy and asshole. Pick one.
 
7:19 PM
Pick what? xD
 
links.. ok you dont help me
 
being lazy or being an asshole
 
but dont joke me
 
I'll pick lazy just in case I have some questions in the future :3
I'm sure if you have a specific question someone will help. Currently you don't have a question @UnderPhp
 
ok thanks..
 
7:30 PM
how can I trim all incoming post data without manually trim each value ?
 
what do you want to trim?
 
the value coming from my form , I have 20 fields, and I want to trim them
 
Guys, is it possible to do something like this:
class Boom
{
    public function __construct()
    {
        echo "Boom!";
    }

    public function lol(Object $object)
    {
        echo "Object";
    }

    public function lol($lel)
    {
        echo "Variable";
    }
}
 
@NikiC @Trowski @bwoebi @ScottArciszewski and all others: wiki.php.net/rfc/random-function-exceptions
going to post this for discussion shortly, thoughts?
 
When the method lol gets an argument of an instance of the class 'Object' it calls the first method. And in when it is of some other type, then it runs the second lol() method.
 
7:35 PM
@ircmaxell I'd drop the second vote
 
It doesn't work, is there any workaround?
 
You are targeting this at 7.0 so if it's accepted then it's for 7.0
 
ok
 
You don't want to create the (false!) impression that this will delay the release
 
@NikiC done
targeting 7.0.0
 
7:38 PM
@ircmaxell First time I hear about "fail open" and "fail closed"
 
@NikiC should I make the definitions explicit?
 
@HassanAlthaf no, you cannot do that kind of overloading
not java
 
have chat of information security?
 
Java ftw
lol
 
7:43 PM
@ircmaxell nah, it's fine. It's clear from context
 
@ircmaxell ooh, the first of a breed of functions that always throws exceptions? :D
 
@Andrea yup
 
Sounds like a good idea for security-critical stuff
I mean, it'd be better if everything did this, but.
 
@Andrea that's 8.0
 
7:44 PM
heh
 
@NikiC think it's worth pushing now?
 
yes
 
ok, sending mail now
 
do it while you still can.
 
@ircmaxell looks good to me… hope that can be quickly resolved :s
 
7:48 PM
hmm ... vivaldi looks kinda nice
 
@ircmaxell Why Error over InvalidArgumentException?
 
@tereško which js and rendering engines does it use?
@Andrea Because Error is the new InvalidArgumentException
 
chrome's (I think it was v8)
 
@NikiC ;_;
 
I am thinking of using it as the "testing browser" .. and it would let me uninstall chrome
 
7:52 PM
ew
there's already too many WebKit/Blink browsers
the world does not need more
Why not... why not a new Gecko-based browser?
 
well, this one is made by the old Opera team
 
can I deactivate after insert trigger by before insert trigger ?
 
the current "opera" is something of a crap
 
@tereško An Opera-inspired browser that uses Blink. So... modern Opera?
 
Does anyone know how to tell composer not to try to install a package via git and to only use a zip file? And no --prefer-dist is not working......
 
7:56 PM
@ircmaxell LGTM
 
@Andrea it's closer to what people hoped for, when Opera ditched Presto
 
I wish Opera would open-source Presto :<
 
yeah :(
 
@Andrea consistent with type errors
 
@ircmaxell I suppose that makes sense...
 
7:58 PM
sent
going to create a second RFC for pcre
 
2016: Apple drops WebKit in favour of Blink. 2018: Mozilla drops Gecko. Blink is renamed "WebBrowserEngine". The end is nigh.
 
actually, @Trowski can you do it? I don't understand it well enough, haven't followed that part
 
@tereško at least it's not OpenSSL
 
yeah, now that you mentioned it ...
there haven't been any new openSSL vulns reported for a month or so
it makes me nervous
like in a slasher movie, where nobody has died for 20min or so
 
8:06 PM
@tereško Flash is even worse... No vulnerabilities for a month...
 
@Andrea actually, competition needs to remain… and Apple dropping something in favor of a google thing? sounds unlikely.
 
@bwoebi I never said I wanted this future
 
@Andrea that reminds me how AMD marketshare has fallen to 15%
 
@tereško yeah D:
 
@ircmaxell What's up with PCRE exactly? I've not exactly been following what the issue with JIT is…
 
8:08 PM
Intel and NVidia have captured the entire high-end
 
@Andrea 2017 Microsoft dropping Trident (or that new Edge engine) in favor of Blink to get even faster browser that can compete ;-)
 
@bwoebi The short version (I believe) is that the PCRE library expects users to check for errors, and either change the JIT settings and retry, or just handle that error properly. The PHP binding to the library does neither...
 
Also, why do we have pcre jit in PHP 7 at all?
 
Allegedly it's faster. It's something that was enabled without discussion.
Because JITs are always faster.
 
8:16 PM
@Danack Ah yeah totally!?!
 
@Danack you want to do the RFC? Since you're knowledgable about it?
 
@ircmaxell No...I'm actually been in a significant amount of pain the past few days, and am really not feeling in the mood for any internals shenanigans.
/Remember to sit with decent posture kids.
 
sorry to hear about that
:-(
 
9:02 PM
is session data can be tampered ?
 
@jemz if you mean by the user? It shouldn't since the session data is stored on the server, not on the client's browser
 
Thank you
 
welcome
 
@jemz by default: only if someone gains direct write access to your file system
but with some frameworks (like codeigniter) session might be stored in user cookies
@HamZa you have led a sheltered life
 
@tereško I untied myself from the chains of SO ;)
 
9:14 PM
/me pokes head in
 
Has anyone else recently linked their Packagist account to the github account, after previously using a username/login for packagist? And if so, are you able to setup webhooks - because no new ones are working for me...ones created before I linked the accounts seem fine.
/and yes, issue is reported....but it's saturday night.
 
Nope sorry. Always have used github login
And yes I can still setup webhooks just fine
 
9:40 PM
@PeeHaa do you know if anyone has written some kind of code converter to get rid of mysql_ stuff and convert them to the new stuff?
 
'new'.
 
@JonClements There are multiple wrappers to make those functions use PDO internally.
 
PDO
okay, just migrated a platform to a newer PHP, so everything broke, so I just for the time being (being lazy and not being paid for it - doing it as a favour) reverted the PHP version - which ultimately doesn't seem the best of ideas
and since I know extremely little of PHP... I don't really know what to search for or what's practicable as a solution... hence my Q - apologies if it's off-topic for the room
 
what sort of errors are you seeing?
also, what version did you come from and what did you upgrade to? :)
 
bah... can't remember now - closed all the ssh windows
I'll look into it again tomorrow when it's not 11pm :)
 
9:57 PM
heh, fair enough
 
thanks anyway - appreciated
 
@tereško I'm using it ~20% of the time and it's good for random browsing
 
(lldb) p $2 == $6
(bool) $12 = true
(lldb) p $2
(zend_array *) $2 = 0x0000000101257480
(lldb) p $6
(zend_array *) $6 = 0x0000000101257600
^ Debugger is trolling me
 
10:14 PM
… interesting, at least.
No other commands in that time?
No doctoring the output?
 
@bwoebi hehe
 
@LeviMorrison well, $2 and $6 were defined the same way, but at different points of time
p foo->bar // -> $2
n // step forward, foo->bar gets altered
p foo->bar // -> $6
so, when just printing $2 and $6 it gives me the values at their definition time, when evaluating in an expression, it seems to refetch via the original expression definition…
@JoeWatkins Debugging a debugger with a debugger trolling one while debugging is fun
 
""fun""
 
@marcio yeah, that type of fun costing you 5 mins to figure out
 
10:58 PM
bug 70231 took me about an hour… ten minutes lost while confused by debugger, lol.
Also these moments… pushed… then … oh… forgot to run the tests… running tests… suspense… okay, everything fine, phew!
 
@benlevywebdesign so what has happened to the multiple accounts?
 

« first day (1771 days earlier)      last day (3181 days later) »