« first day (1465 days earlier)      last day (3488 days later) » 

9:00 AM
It has absolutely no other effect, although you can do some weird stuff by letting branches cascade through and also you don't have to put the final else at the end
But don't do any of those things
 
I've been given a plaque of code(upload script) that doesn't work anymore because the server has been updated to php 5 lol
 
Awesome
Presumably 5.2 or something as well?
 
Yea well..the person that's written it isn't really a backender
From 4.5(I think) to 5.4 lol
I am sure it's from one of the 4 versions
I guess i've found the line where it's not functioning anymore although i'm not sure what the problem is with it
 
pastebin?
@DavidH (really doesn't matter but pedantry itch) there was no 4.5, stopped at 4.4
 
Oh yea 4.4 it was indeed, also i'm not sure if I could pastebin this, it's using variables from an extended switch
I could however kind of explain the line?
 
9:06 AM
@DaveRandom At some point you always realize that government choice was wrong..
 
Literally no-one chose our government this time, we currently have a coalition of two sets of numpties
@DavidH You can try, probably need code sample but you can try...
 
@DaveRandom Still better thank looking your people making totally wrong choice. :-)
 
morning @Jimbo
 
...what is it about php that makes it incompatible with bison 3.0?
 
9:16 AM
@Jimbo monring
 
9:29 AM
@DaveRandom Sorry for being so late, had to help bring in some new speakers for in the office! pastebin.com/BL6USD4P
 
array(
      1 => st('yyy'),
      0 => st('xxx'),
    ),
am I the only one shocked? :(
there is a rationale behind this... but still :(
 
/me doesn't understand ...
 
The order of the indexes...
 
9:38 AM
yeah...
 
@FlorianMargaine not exactly shocking. ordered maps == key order can matter
i'm kinda curious as to why it matters in this case, but eh.
 
it defines how it's shown in a form
and 0 means false, 1 means true
 
makes sense then
 
so we want the default value to be true
 
@cHao There was a very specific version/set of versions of bison that generated an invalid parser, so at the time a version constraint was introduced to avoid that, and I think if it doesn't work with 3.0 it's just a hangover from that (i.e. it will probably work if you disable the configure check but you'd have to test)
 
9:40 AM
yeah, makes sense... still, ugly
 
@DaveRandom testing now :)
 
@DavidH What do you mean by the code would not dump any other variable? You mean it fatals in the insert() call?
Because if it fatals, it will be accompanied by an error message...
 
there were some warnings generated during the build...something about deprecated options and redeclared macros
 
@DaveRandom error_reporting doesn't add anything to it and well without the var dumps above it it'd just show a white page
 
@DavidH ini_set('display_errors', 1)
 
9:43 AM
I have:
error_reporting(2047);
ini_set('display_errors', 1);
 
Use error_reporting(-1)
 
where is the switch?
 
But yeh, that sound still show you an error
 
there are cases... but no switch
 
But also, you need to check you error logs, an it's possible nothing will be logged because someone use @
Which you should never user, but I notice some in your code so...
 
9:45 AM
Right..i'm not even familair with the way of coding used here(as I was designated to check it out)
I felt clueless reading it too but -1 in error_reporting finally shows something!
 
> Yep, the thing is, that $HTTP_RAW_POST_DATA can be even populated when always_populate_raw_post_data is set to 0, so we had to introduce the -1 value to not break BC but allow to opt-in to the never populate $HTTP_RAW_POST_DATA which can save a huge amount of resources.
Is it me, or does that make no sense?
@DavidH Probably a bunch of strict standards errors, I'm guessing
 
Correct.
 
What is the HTTP response code when it fails?
 
Strict Standards: Declaration of mysql_database::select_database() should be compatible with database::select_database() in
This about 4 times with different functions
 
does XFAIL mean "expected failure"?
 
9:47 AM
Yeh that's not actually going to break anything
@cHao yes
 
Oh really? I thought it would because the code continues inside the insert->($db) ?
The upload itself I mean
 
4 mins ago, by Florian Margaine
where is the switch?
 
k, then the only failures are expected
 
@FlorianMargaine You ment me?
 
9:48 AM
Oh sorry, I wasn't sure. pastebin.com/BL6USD4P
 
yes. I don't see the "switch"
I only see cases
switch ($variable) {
    case "text":
        // stuff
        break;
    case "stuff":
        // stuff
        break;
}
this is how it works
I see the cases, but no switch
 
Oh pardon me, forgot to add:
switch($type) {
 
so the 1st bit of code is out of a case, but in the switch?
lines 1-16
 
@DavidH Perhaps you should stop using the stfu operator
 
hello
 
9:51 AM
18-40 is inside that switch
The rest is inside:
switch($action) {
Sorry , terrible I forgot to add them, the variables from the switches are of course the defined ones with @$_Post
 
@PeeHaa perhaps PHP should stop bitching about undefined indexes if you know they might not be defined. :P
 
@cHao Hell no
 
<?php
class A {}

trait ArrayAccessor {
    public function offsetSet($offset, $data) {}
    public function offsetGet($offset)        {}
    public function offsetUnset($offset)      {}
    public function offsetExists($offset)     {}
}

$test = new(["hello", "world"]) {
    use ArrayAccessor;


} extends A implements ArrayAccess;

var_dump($test,
         $test instanceof ArrayAccess,
         $test instanceof A,
         class_uses($test));
?>
 
@DavidH can you show us the switch too in a pastebin please?
 
how strange does that look ?
 
9:52 AM
:)
 
Yes of course, one moment
 
heh
 
@JoeWatkins pretty strange... but understandable
it's weird that the extends/implements are at the end though
 
$test = new class(["hello", "world"]) extends A implements ArrayAccess{
    use ArrayAccessor;
};
that ?
 
HEY
 
9:54 AM
just wondering...what happens to "hello" and "world"? :P
 
constructor
 
@FlorianMargaine pastebin.com/axwLVN9v
 
Maybe the world said Hi?
 
@JoeWatkins personally I prefer that, yes
 
@JoeWatkins there's no constructor, though :P
 
9:54 AM
$test = new A implements ArrayAccess{
    use ArrayAccessor;
} (["hello", "world"]);
@cHao it's pretend
 
dunno :/
 
the last one is how it is right now
 
I think we should follow what java does
 
the middle one with new class() is the only way I can find to move ctor args to where people seem to want them ...
yeah but but conflicts ...
 
heh... these suckers
 
9:56 AM
$test = new A implements ArrayAccess{
    use ArrayAccessor;
} (["hello", "world"]);
this is the least typing
but it's a bit strange that get_class($test) will not return A
 
it doesn't sound like an anonymous class though
 
it threw bob ...
 
shouldn't it be:
 
well it's the same as java other than the position of ctor args
 
$test = new extends A implements ArrayAccess {...
?
 
9:58 AM
it's verbose though
 
yeah but new A makes it look like it's a new instance of class A...
gotta go
 
yeah but java does that ... so does everywhere I think ...
lata
 
hello all
 
Hey, following Laracasts to get setup I downloaded and installed MAMP, then in the next lesson it basically says forget everything you may have struggled with to install and brings you into Vanguard instead. Does Vanguard need MAMP installed or is it completely in place of it? Harddrive isn't that big and MAMP is pretty bulky. Going to uninstall it if I don't need it.
 
you mean "vagrant"?
 
10:09 AM
oh woops yeah I keep calling it that
 
@JoeWatkins that one
 
^ yes, the others are confusing
 
@FlorianMargaine new extends looks really weird...
class is a reserved word, everyone knows it's a reserved word, it describes what it is doing, that's the one I would want
Ideally I'd say new object but that would be a new reserved word
 
new new
Defeats the object really, doesn't it.
 
@iroegbu do you know if I need MAMP for Vagrant to work?
 
10:24 AM
Just install Apache, PHP and MySQL
@Ryan Google is your friend
 
@Ryan No - and I suggest you follow something like: reddit.com/r/PHP/comments/1m7r74/…
 
@iroegbu there's so much out there and it becomes outdated so fast, its pretty hard (if not impossible) for a complete beginner to know what's good on google and what's not.
 
@Jimbo Defeats the object... oh, you...
 
@Danack thanks. I'll check that out. Did already install but not with whatever PuPHPet is
 
@DaveRandom ok I committed that one ...
it looks a bit strange to me ... I don't like all the typing ...
class Outer {
    protected $data;

    public function __construct(&$data) {
        /* array access will be implemented by the time we get to here */
        $this->data = &$data;
    }

    public function getArrayAccess() {
        /* create a child object implementing array access */
        /* this grants you access to protected methods and members */
        return new class($this->data) implements ArrayAccess {
            public function offsetGet($offset) { return $this->data[$offset]; }
that doesn't look too shabby
class Outer {
    protected $data;

    public function __construct($data) {
        $this->data = $data;
    }

    public function getArrayAccess() {
        /* create a proxy object implementing array access */
        return new class($this->data) extends Outer implements ArrayAccess {
            public function offsetGet($offset)          { return $this->data[$offset]; }
            public function offsetSet($offset, $data)   { return ($this->data[$offset] = $data); }
            public function offsetUnset($offset)        { unset($this->data[$offset]); }
that does ...
 
10:33 AM
Sorry, how does the anon class have a $data property in the first example?
 
doesn't
 
So it would need an explicit ctor, presumably, in order to work?
I mean tbh I don't care about a lot of typing as long as it reads correctly
Far more people are going to read the code than write it...
 
yeah, that shows it fails because no inheritance, the second one that uses inheritance can access data as you would expect
 
Presumably the anon class could define its own __construct() if it wanted to though?
 
yeah
 
10:36 AM
btw internally how do this work? Do you still create a ce at compile time, presumably? Or is it actually composed at run time every time that method is called, i.e. as it reads?
 
entry is reused, it works the same as any other class ...
 
Was just wondering if there's any scope for extends $this
(for access to protected members)
 
tricky ... also, $this isn't a type ...
(we don't allow hinting for ($this $object))
 
Yeh I know, I'm thinking: could be done, would be slower (you'd have to build and/or select the correct ce at runtime based on the ce of $this, since it's not guaranteed to be the defining class)
 
I like simple ...
 
10:43 AM
Indeed, was just spitballing really
@JoeWatkins Actually, there is precedence for this element (instanceof right operand)
Again, not asserting it to be a good idea though
 
Bob
11:23 AM
hi guys
 
*crickets*
 
hmm .. strange
using a firefox on phone drains a batter as fast as watching a HD video
 
HD web browsing!
 
11:42 AM
Hey, could one of you help me match /. or /.. at the end of a string via regex?

I've managed to cook up "/([\\/\\..]+|[\\/\\.]+$)+/" which doesn't really do the trick.
 
@DaveRandom Haha, f* awesome.
 
@JesperJacobsen #(/\..?)#$ ?
 
@PeeHaa Thanks
 
@PeeHaa #fail
 
ThW
'(/[.]{1,2}$)D'
 
11:47 AM
Oh
 
What does the D modifier do?
/me is too lazy to open the fine manual
 
ThW
$ matches the end of a string or the \n at the end of a string
with D it matches only the end of a string
 
@JesperJacobsen don't forget to escape the second dot as well
 
Thanks for the quick responses, it works fantastically
 
@DaveRandom huh why?
What did I screw up this time?
 
11:50 AM
@PeeHaa $ outside the enclosure, second . not escaped :-P
 
ow crap
yeap
 
btw I didn't know that dots inside square brackets shouldn'd be escaped
 
ThW
:-)
 
@ThW Ah so it's like m but only affect $ behaviour and not ^ ?
 
ThW
@DaveRandom nope
 
11:51 AM
Then I don't get how it's different to m
Oh wait
No I get it
#monday
 
ThW
(^foo$) matches "foo\n", (^foo$)D does not
 
yeh I see
Hmm, I would generally trim() stuff before that point so I guess that's why I've never needed it
 
ThW
@DaveRandom Doesn't hurt to add it
 
True, I should read that page properly at some point, there are loads of modifiers I don't know about. I'm sure I read at some point in the distant past but I've evidently forgotten a lot of it
 
does anyone know free library of sms servies?
 
11:56 AM
Free and SMS don't go together.
 
bt i just wana use it for testing porpuse
 
Yeh, SMS is an epic rip-off
It costs the networks almost nothing to support it these days, and yeh they still charge multiple pence (or whatever) per message, it's a bit of a joke
 
Chances are if you do find any 'free' SMS service, it's either going to be cripplingly limited or have a shitty usage cap. Or both.
Plenty of sites offer it dirt cheap, though.
 
Usually operators provide a way to send a message from their websites but you need to enter the captcha
 
@AlfanAminAliGalmani Most services will give you a few for free initially, but usually only 10-20
 
12:01 PM
@DaveRandom new Class feels even weirder tbh
 
new anon?
We really don't need any more keywords though...
 
it was class A {} new A ... in his example
really feels like an instance
 
When getting files via the RecursiveIteratorIterator, non standard characters like Å gets turned into AÌŠ - even if the file is UTF-8 format.
Is there any way to turn this back to Å?
 
new { %code% } extends ClassName; but guys new ClassName {}; is easy enough isn't it
 
new ClassName is what he's got for now
and which I'm arguing is weird
 
12:04 PM
@FlorianMargaine Yeh I don't like that, even if it what Java does it really doesn't look right. But on the other hand, it is an instance of A in a way, the only way in which it wouldn't be is get_class()
 
ThW
I like the $object = new class extends A implements B { ... } (); version
 
I prefer the ctor args at the start, personally
Jesus, the bikeshedding here, imagine what internals will do to it... :-(
 
Yeah .. I'm worried about that too
 
@JesperJacobsen That's just a display problem (i.e. you haven't told the client the correct charset), PHP isn't altering the data
 
@DaveRandom okay thanks :)
 
12:08 PM
I guess the ÌŠ must be the funny circle-thing (whatever it's called) composed onto the A as two distinct codepoints
 
@DaveRandom I feel so stupid now.
 
I feel am stupid all the time, don't worry about it
 
Hah, anyways thanks a lot.
 
lol
 
12:10 PM
@JesperJacobsen i) please stop calling them non-standard. They're perfectly standard they just aren't in the range 0-128 ii) The characters are probably fine, your browser is probably just displaying them wrong because you're setting the wrong character set. Please check stackoverflow.com/questions/279170/utf-8-all-the-way-through
I've got to get out of the habit of writing answers after @DaveRandom has beaten me to the punch.
 
@Danack Okay sorry ^^ I just take the english A-Za-z as standard characters. Will change my wording in the future
 
12:37 PM
Coming next week on #PHPRoundTable: @philsturgeon vs. @taylorotwell. The PHP parody accounts are salivating right now.
 
man its gonna be funny
 
Funny ha-ha or funny 'oh my god please stop'.
 
@JoeWatkins @NikiC @ircmaxell how was the podcast?
 
both in the respective order :)
 
@Danack lol @ "vs"
Fight! Fight! Fight! Fight!
 
12:43 PM
"Retard fight!" - I KEED, I KEED!
Both nice guys - just not always right, but act as if they're always right...
 
@FlorianMargaine really late ...
 
@JoeWatkins told you :D
but interesting anyway?
 
1:03 PM
yeah was fun ...
my mic broke near the end ... and I was pretty exhausted ...
 
k, cool
 
Found a really cool way of identifying if a business isn’t going to be around for that long: a .io domain.
I got to the really narrow pass and someone rang the doorbell.
 
:DDD
 
user895378
morning.
 
1:10 PM
Morning @rdlowrey. Do you have an eta of when you are planning to push and tag a new Artax RC? One with the PHP back to 5.4 and the getRequest doofer?
 
user895378
I'm adding a test case right now for the stuff we talked about on friday and will tag/push shortly.
 
cool.
 
user895378
I spent the weekend seething over how fucking terrible guzzle is.
 
Hey @rdlowrey
 
user895378
And how its authors don't know anything about anything.
 
1:13 PM
@rdlowrey lul
 
user895378
Which led to more annoyance that mtdowling tried to shove an idiotic HTTP "standard" down everyone's throat.
 
Is the redirected url among that stuff?
 
user895378
</rage>
 
user895378
@Fabien yes. Will ping you guys shortly to let you know it's there.
 
and the update for allowing numerics at the beginning of urls? :)
awesome thanks
 
1:14 PM
@rdlowrey He was probably asked to, as the author of the HTTP library used by most people. At least he realised the idea was stupid and gave up on it.
 
user895378
@Fabien Is this not a thing? I don't know ... the URI handling is maybe the oldest code I've written that is still actually used in any of my projects. Can you elaborate?
 
@rdlowrey Be nice! Don't end up like the JavaScript guys. Seriously :-)
 
Dave's updated the DNS Invalid regex as it previously didn't allow numerics to start a url
 
user895378
@Fabien oh right, I forgot about this.
 
user895378
@Jimbo Well, I didn't care until I saw that the new guzzle "supports non-blocking" (this is nonsense, btw) and that its API looks exactly like the artax API (except it's not really non-blocking in any useful sense).
 
user895378
1:19 PM
It gets tiring implementing things that are significantly better than the status quo, then having other people say, "oh no my thing sucks I'll duplicate rdlowrey's functionality because my identity as a coder is is tied up with my crappy lib and continuing pretending my thing is awesome."
 
user895378
This must be what it's like to be linux :)
 
Is the best product ever the most marketed?
 
user895378
Never.
 
@rdlowrey You need a nice website to go with it, and docs. Auryn seriously needs this. PHPDI does, and it's nowhere near as awesome as Auryn
 
Good mroning
 
user895378
1:21 PM
@Jimbo Yeah, I just don't have time :/
 
user895378
@ircmaxell morning
 
I'd love to see a build of yours for doing a relatively simply thing like detecting whether a page is online/offline en-mass. Bearing in mind the http status code may still be 200 with a 404 in the html.
 
moin
 
user895378
@Fabien you mean like a downforeveryoneorjustme.com thing?
 
user895378
@JoeWatkins So you're going to have another go at anon classes (awesome)?
 
1:30 PM
More like, here's 10 URLs. Tell me which are offline based on status and HTML keywords. Oh and 150 machines will be hitting you at once.
 
we are yeah ... I just wrote code ...
 
So 1500 at once request wise.
 
user895378
@Fabien I'm not sure I see where "HTML keywords" fit into this. Can you expand on that?
 
I gTalkd you the clarification. Trying to stay under the radar :)
 
PIRATES, GET HIM!!!!
 
1:34 PM
On each check we'd have to switch IPs or something to prevent being spotted.
 
@JoeWatkins last night was interesting... :-(
 
yeah, I failed a bit ... that was really late, I was struggling to just think of something to say ... which is not like me at all ...
 
yeah, we talked about that after you left, as a point of feedback for Sam to do next time (ensure even participation, etc)
 
Just inviting people to a talk-show at 3am their countries time is not a good place to start.
 
@JoeWatkins When will we have a higher-level abstraction of threads in pthreads? Would be nice to have nice libuv threads in pthreads… Who needs low-level threading primitives like mutexes etc.?
 
user895378
1:40 PM
@Danack and @Fabien v1.0.0-rc2
 
@rdlowrey +1
 
Horsham.
Thank you @rdlowrey
 
user895378
@Fabien Just to recap ... you can access the final URI like this:
 
user895378
// The LoD can shove it.
$finalRedirectedUri = $response->getOriginalRequest()->getUri();
 
@rdlowrey Er - weren't you going to revert the php requirement to 5.4?
 
1:42 PM
Cheers @)
 
user895378
@Danack ah dang it.
 
force push all the tags!
 
user895378
Hold on. I'll kill the tag and re-tag.
 
user895378
Oh, I didn't realize I could force push a tag, but I guess that totally works :)
 
@bwoebi I dunno what that means, the support for threading that libuv has is a light wrapper around whatever system functions are available and nearly identical to the lower level posix api pthreads is based on ... pthreads is higher level than libuv threads in other words, if you want higher level than that, you can design your implementations in user land ...
 
1:48 PM
@JoeWatkins uh, wait. I just want something which is compatible with libuv in PHP… (which pthreads aren't)
 
user895378
Well I think the problem there is that the libuv extension does things that aren't thread safe
 
user895378
Since things like pecl/libevent and the php-uv extension are designed to run in a single-thread environment that's usually okay.
 
user895378
But they blow up if you try to use them in conjunction with pthreads :(
 
eval() is never the answer. eval() is the question. The answer is 'NO'. — Second Rikudo 46 secs ago
 
user895378
@Danack Okay, should install with 5.4 now.
 
1:54 PM
Hello
Second?
 
why is md5 not a good hashing algoritm anymore
 
@Sliver2009 Because it's easily broken with brute forcing
 
because
 
Among other things
 
1:55 PM
ah k
 
@SecondRikudo Because it's easily broken without brute forcing.
 
and since the bcrypt uses 60 characters it is less easy to brute force?
 
it's less easy to brute force for a lot of other reasons
 
@Sliver2009 bcrypt is practically impossible to brute force because it's much slower than md5
 
1:56 PM
@Sliver2009 well, MD5 is just fine as a hashing algorithm , but it is not meant for hashing password
 
oh you guys are talking about pw hashing
 
yeah
 
@tereško actually it's a very bad hashing algorithm
 
@tereško it's not "just fine as a hashing algorithm" either tho... It's broken just as bad there as well
 
So what would be the best way to encrypt/hash passwords
 
1:57 PM
@Sliver2009 use password_hash and be done with it
 
im just curious
 
bcrypt hashes are hashed and rehashed hundreds of times, making the entire process take a few hundredths/tenths of a second instead of less than a millionth.
 
also, watch that video
 
ah hehe okay, and password_hash can use 255 characters so that would be even safer
i will
thank you
 

« first day (1465 days earlier)      last day (3488 days later) »