« first day (2012 days earlier)      last day (3161 days later) » 

14:00
@DaveRandom NASA
busted
no, seriously, 62 snapshots with parts needed to be synchronized..
If you mean NASA, I picture floppy disks and a paper file system. If you mean the NSA, I do not picture PDO (or PHP, for that matter...)
@SergeyTelshevsky Your infrastructure is bad and you should feel bad
:-P
@JoeWatkins Crazy idea ... Why not:
new class {
    private $foo = $bar;
    // ...
}
@DaveRandom I don't feel bad for making it better :P
I.e. allow property initialization to use variables from the outer scope
14:03
basically @SergeyTelshevsky's job is
That would make the variable to property conversion less magic for me
@tereško this
and mine is:
there I am on this picture
in a pillar of flames
@NikiC awesome idea
14:04
Hello
"I put the fires out." ; "No you didn't, you made them worse." ; "Worse... or better?"
Funny the fire talk as I bought an extinguisher today.
@Fabor This seems like an odd thing to be so pleased about, this is the second time you mentioned it... do you want some kind of home safety intarnet points bonus or something? :-P
I used to keep a fire extinguisher behind the seat of my truck, along with a bunch of other junk. At some point the pin worked out of it. It went off in the cab. What a goddamn mess that stuff is.
@NikiC Plus it let's you choose the property visibility.
14:20
@LeviMorrison lets*
@MadaraUchiha yeah, looks similar, the only thing missing is the hat, gotta get that one
@MadaraUchiha things being on fire aren't a problem … only when they burn down.
@bwoebi is there anything that doesn't burn down if it's on fire?
some things are supposed to be on fire, after all. who are we to judge.
@SergeyTelshevsky depends on the type of fire
I wouldn't talk about burning down in the context of fusion :-P
14:28
seriously in need of a vacation
@JoeWatkins I fully support Nikitas awesome idea of directly including variables in property decls
speaking of fire.. was listening to this song whole day, as if I knew it was coming
@DaveRandom It was topical the second mention. And I am raising awareness that we should all buy a fire extinguisher.
:P
Let's have a fire extinguisher party!
Ekn
Ekn
that's a nice song, the Miles Kennedy guy is a damn good vocal (and well, slash is slash :p)
14:37
Thanks @Oldskool ;) "Permission denied (publickey). "
2 mins ago ;)
@Duikboot You should really be starting to wonder if someone is not trolling your box or BB account.
Im going to eat my shoe.
Anonymous
ahem
Hey is there any problem in my code: <?php
include('database.php');

$getCmts = $conn->prepare("SELECT * FROM PostComments WHERE SubjecName = ? ORDER BY DatePosted DESC LIMIT ?");

$SName = $_GET['SubjecName'];
$CLimit = $_GET['cmtsLimit'];
$getCmts->bind_param('si', $SName, $CLimit);
$getCmts->execute();
$getCmts->bind_result($Id, $Name, $Comment, $DatePosted);

while($getCmts->fetch()) {

echo "<pre style=\"background-color: #fafafa; padding: 0px;\">";
14:42
I don't think you can use placeholders for LIMIT
Yeah, LIMIT allows no binding
also this ^^
because ¯_(ツ)_/¯
^?
What did you mean?
14:44
@CharlesCraft50 Instead of ...LIMIT ?" do ...LIMIT " . ((int)$CLimit)
ok thanks
limit allows no binding??
is that only the problem?
that's news to me, or is it just the PHP mysql driver?
Lol bitbucket:
This site is down at the moment. Grab a snack — we'll be back before you know it.
14:45
You're experiencing pretty much the same thing by the look of it.
You must specifically bind it as INT param, PDO defaults to string and that's not allowed for LIMIT/OFFSET and such.
Still has a problem , I already use LIMIT" . ((int)$CLimit) . "
Just casting is not enough.
@NikiC no, could in the future, I guess
$result = yield $this->db->prepare("SELECT id, title FROM bugs WHERE id > :id ORDER BY id ASC LIMIT :num", ["id" => 0, "num" => 1]); perfectly works and returns one row @DaveRandom @Ocramius (this is the amphp/mysql driver, perhaps the PHP mysql drivers have arbitrary restrictions, but the mysql server definitely allows that)
@NikiC I like
you wanna try that ?
14:50
@bwoebi huh, I'm pretty sure I tried that once and it failed, maybe it's PDO but I didn't think it was that intelligent
@Oldskool he is binding as int, if you look at that
@DaveRandom I just can report that it perfectly works … ^^
@CharlesCraft50 I repeat, casting is not enough. Also see stackoverflow.com/questions/36602689/… for a very similar example.
67
Q: How bindValue in LIMIT?

Nathan HHere is a snapshot of my code: $fetchPictures = $PDO->prepare("SELECT * FROM pictures WHERE album = :albumId ORDER BY id ASC LIMIT :skip, :max"); $fetchPictures->bindValue(':albumId', $_GET['albumid'], PDO::PARAM_INT); if(isset($_GET['skip'])) { $fetchPictures->bindValu...

Or that one.
Wes
Wes
Who wants ElePHPants? I’m giving away a few from my collection, but it’s gonna cost you. :) http://bit.ly/1S7w5nk
@Wes sacrilege
14:55
@JoeWatkins nah
I'll have a go then
@JoeWatkins should be only a small variation of your current patch though, inside compiler?
@MadaraUchiha allows* would have been better.
@bwoebi yeah maybe quite easy change ...
public $thing = &$this->bar;
@JoeWatkins that's the only thing feeling a little weird, but I think it's okay
14:59
@Oldskool I use Mysqli not PDO, so how can I use PARAM_INT?
it's a totally new thing though, it's at least as weird in the property case as use is ...
yep
hence I think it's okay
We should simply not allow references
:P
@CharlesCraft50 you cant
I wish we could just make that decision ...
15:01
you have to use bind_param() wirth "i" instead of "s"
they make every thing worse
@NikiC that's half of the point of use() … to not have a cyclic reference back to a main object
user924016
moornongs
@JoeWatkins Another option to consider is a java-style WrappingClass::$this->prop
@CharlesCraft50 Oh, my bad. Thought it was PDO. These things look so similar sometimes :)
15:06
@NikiC a static prop named $this isn't forbidden today…
The only problem with tea, as I see it, is that it is not self-replenishing.
@DaveRandom that sounds like the invention which will rescue humanity :-)
Some sort of tea stream
15:21
Qualitea
@DaveRandom The only problem with tea is that it is tea
I already have Arduino :)
@PeeHaa I know where you live
Anonymous
I'm Uk.. and to be fair.. Tea is pretty shit
15:28
@Jay Are you import uk?
:P
@Jay I will kill you make some more tea
He will teaboard you
it's an exceptionally polite form of torture
Anonymous
ha ha ha
15:30
@tereško I already use 'si' and I still cant find the problem: gist.github.com/CharlesCraft50/3502a4e9d8fb441c4a91dbbe5b304f0a
> Excuse me, would you mind awfully telling me what I would like to know so I don't have to teaboard you? There's a good chap.
it ranks up there with digestives under the fingernails
ugh mysqli is so godawful
15:32
True true
@DaveRandom What's the difference between a teabag and a teaboard in this context?
spelling
One is in my pants, and the other is a thing you use to make tea
Well, technically...
Anonymous
I'm off, have a good evenin o/
15:37
latert
user924016
So Friday is a "no-work" day in Denmark
user924016
\o/ yes!
Friday is a no-work day every week in my house
mrgsiasdfnhklazxcz
user924016
Morning to you too
15:58
\o
!!xkcd business idea
Anonymous
@RonniSkansing In Dubai, only Friday is off.
Anonymous
You work 6/7 days ...
Anonymous
8:00 - 22:00
16:05
sbicaps
@samayo work / sleep instead of work / life balance.
Anonymous
Yeah, my boss would even call me on Friday to do something urgent.
hi i was wondering is there a way to override a mysql function like CURRENT_TIMESTAMP to return hello not the time ? thx
Anonymous
So many bad memories
I wish there was an easier way to fix bugs than opening PRs whilst still not having CVS access
user924016
16:11
@samayo hard life
Anonymous
Yeah, but this is worse :\
Anonymous
It's ok though, someday is will be less worth.
Anonymous
or worth less :)
You were/are living in Dubai too?
Anonymous
were
16:13
nice, I left this boring hell too
Anonymous
Where were you?
Anonymous
I'm still planning on going back though, to start my own business, but that will be in a long time from now.
At Namshi at first, then at propertyfinder for a couple of weeks until I decided I feel better in Moscow
Anonymous
Ah, I worked in Deira (near Nife road) but we slept in Sharjah.
Anonymous
It is a vibrant place though, unlike here in Switzerland.
16:25
Hi all, did some one have the opportunity to test this process manager github.com/php-pm/php-pm ?
Huzzah!
!!rfcs
Apr 19 05:16:16 149-210-224-55.colo.transip.net run.php[30419]: [2016-04-19 03:16:16] Message received
Apr 19 05:16:16 149-210-224-55.colo.transip.net run.php[30419]: array(2) {
Apr 19 05:16:16 149-210-224-55.colo.transip.net run.php[30419]: ["rawMessage"]=>
Apr 19 05:16:16 149-210-224-55.colo.transip.net run.php[30419]: string(23) "{"r11":{},"r100286":{}}"
Apr 19 05:16:16 149-210-224-55.colo.transip.net run.php[30419]: ["message"]=>
Apr 19 05:16:16 149-210-224-55.colo.transip.net run.php[30419]: object(Room11\Jeeves\Chat\Message\Heartbeat)#96 (3) {
@DaveRandom that's the last logged message and after that just nothing...
No idea what's going on
16:37
@PeeHaa Any particular reason why @Jeeves isn't a RO that can pin and unpin things on his own?
I suspect a broken socket connection
@MadaraUchiha Yes laziness of @DaveRandom and myself to actually implement it :P
@MadaraUchiha I was about to say because @Jeeves is unreliable, but @PeeHaa is a room owner so that doesn't hold up :/
\:P
@PaulCrovella Hell, I'm a mod!
@PeeHaa Right, if you ever do implement it, give me a call, you'll need to.
ok?
16:39
(To figure out why, give RO to Jeeves)
or you could just tell us
@PaulCrovella I could... I could...
@Feeds But, did he?
Yeah, he did, so it was changed :D
lol
16:41
It used to be that only people above 1k rep could be room owners
What was the issue?
ooooh. That's new for me
(We had that problem with CapricaSix in the JS room, so we had to actually get her there :D)
hehe
I would have just moved rep otherwise because sue me :P
Those 5 answers were bad enough :)
16:43
@PeeHaa Mods used to be able to grant RO regardless of rep though
Hence "you'd need to"
Anonymous
@PeeHaa What!??
nah, you just wanted to brat about how you guys brought cap to 1.5k rep
just one less way for you to feel useful now
Anonymous
I've been here 4 years, and you add the bot as a room owner?
16:44
It's size that matters not duration
girth, really
Could someone please review the fix? I'm not sure about line 4710 in zend_vm_def.h
@MadaraUchiha It's 100, I went round this with cv-pls
16:47
@DaveRandom Aha, I see
@PeeHaa must've crashed with sigsegv
@bwoebi Shouldn't that show up in service log?
/me is still utterly confused by all the systemd changes :(
@bwoebi Maybe, not sure if it would log a graceful fatal though because CLI SAPI
I meant the initd process, not the php process
or systemd or whatever this PID 1 thing is called
@PeeHaa do you log PHP errors anywhere from it?
16:49
I don't tell it to do that no
Let me have a quick looksy
Simple approach is php -d error_reporting -1 -d display_errors 1 script.php >> log.txt 2>&1
let me change the service to do that
or whatever the correct args are, I wrote that without looking at docs..
I think that's right though
close enough
Oh i think it's -d error_reporting=-1 actually
(with =)
Or you could just set it in the script, wouldn't catch startup errors but we don't have any of those...
I can never remember what the correct setting are to get it to only output errors on stderr, I always seem to end up with no error output or double on CLI
17:13
@DaveRandom Yeah = it is
evenin
evenings @tereško
nin'
Ekn
Ekn
evenings
lolmerika
Anyone here have memory problems with running functional tests in Symfony3?
> Ultimately, Weiler said, he would like to see default settings on the internet changed to make access to pornography more difficult.
I understand it can make you go blind so there is some merit to the story
First it was Doctrine loading up all the fixtures and they were all being held in an identity map so now at the end of every test I clear that but now I still have a memory problem after about 40 tests but this time it says it
17:20
!!version
Holy shit
Never mind
I'd like to know who he's gonna talk to about getting the internet's default settings changed
foo
!!version
@PaulCrovella Trump?
YAY! Just compiled the master branch of php-src
Ekn
Ekn
17:26
trump(ets)
ugh.. I'm sick of all this rain already. the bottom of this page is what I mean...
but it suppose to be sunny next 4days
17:45
Can anyone recommend a template engine with autoescaping, inheritance / blocks and maybe "understanding" of attributes (e.g. selected=true|false instead of selected=selected or nothing)? At best also available for both, JavaScript and PHP?
mustache is ok but without block thingy
s/ok/i like it/
@FélixGagnon-Grenier Current solution and not sufficient because of missing inheritance / blocks.
e.g. if you have multiple pages using the modal layout, how would you do that?
@kelunik Really cannot recommend, but smarty?
<div class="layout-modal">
    <div class="modal">
       <!-- content -->
    </div>
</div>
^ If you put it in header.mustache and footer.mustache and use partials, you have two non-closed <div> elements in the first one and two closing ones without matching opening in the latter one.
@kelunik have a abstract super view class return that modal layout, replacing content with the content of an abstract makeContent method
inheriting classes would define makeContent
the whole is called from a show method of the abstract super class
17:56
I could probably "fake" inheritance with a custom rendering that processes something like Front Matter @ Jekyll and renders it inside the parent then.
@bwoebi what about it?
should already be fixed
@NikiC didn't you want to fix that?
ah
wasn't sure whether you fixed offsetExists/Get functions, __isset/get or both
18:18
yo folks, any idea if it would be worth optimizing compiled DICs to something like following:
$build = function ($name) {
    goto $name;
    ServiceA::class:
        return $this->services[ServiceA::class] = new ServiceA;
    ServiceB::class:
        return $this->services[ServiceB::class] = new ServiceB(
            $this->services[ServiceA::class] ?? $this->services[ServiceA::class] = new ServiceA()
        );
};
basically super-aggressive inlining and avoiding recursive calls wherever possible
@Ocramius E_UNEXPECTED_VARIABLE after token GOTO.
Oh, dammit, that's not supported?
/me tries some stuff
@Ocramius wat
@NikiC basically take factories (or definitions equivalent to following):
$serviceA = function ($c) {
     return new ServiceA();
};
$serviceB = function ($c) {
     return new ServiceB($c->get(ServiceA::class));
};
and then at boot time compile them to the garbage above (and cache that)
I reckon that DIC overhead is currently 20~30% of my app's runtime
@Ocramius Use Aerys. :P
18:25
@kelunik does Aerys compile down to something like that?
@Ocramius You reckon or you know?
@kelunik nah, but you don't have to fire everything up again on each request ^^
@NikiC know - it's ~30% of mixed DIC + factory + instantiation overhead
@Ocramius No, but all those things happen only on boot time, not on every request.
excluding DB connections
@kelunik of course they don't, but I have at least a dozen services instantiated, and I'd be able to remove a lot of stack frames there
18:26
@Ocramius normally this is handled by looking up a closure in a map and calling it?
@NikiC yes, and the overhead is actually the closure call :P
We're talking about a 15ms app tho, not a massive FW
on 7 i assume?
yeah
seems a bit weird
@Ocramius (15 ms sounds like massive Fw to me)
18:27
I'm just wondering - if we managed to compile down any DIC to that, how much we could squeeze out
object creation is more expensive than closure calls
yes, but that cannot be avoided
@bwoebi FWTools has a runtime of about 40ms.
the 12-or-so services stay. Command bus, DB connection, event stream, aggregate, event, command, etc
(sorry, some of the above are not actually services, but still instantiations)
@kelunik of which most time is spent idling (inside PHP)
18:29
@bwoebi 15ms is not much - I'm used to 250~500ms for larger FWs, and it's usually not a problem for most enterprise apps which are usually for intranet usage
I'm looking at a generic thing tho, my app is just one example of where it could actually save a couple dozen method calls per request
Even typical micro-frameworks/routers could be compiled down this way (fastroute, for example)
@bwoebi I guess that's the same in @Ocramius app.
possibly
@Ocramius try it :P
@kelunik yes, it's a typical blocking monolith :)
but I never trust any benches I haven't faked myself ;-D
18:31
Command goes in, nothing comes out tho, so all writes are async anyway
@Ocramius that's not the point; even with non-blocking you need to wait (just that you can do other things too)
can we make zend_fetch_dimension_address_read_IS a ZEND_API thing?
@bwoebi even with something like aerys I'd still have to build services when they are not shared, so I'd save cycles also there
@marcio why? just do a zend_symtable_find ?
ah, that's what I'm looking for :)
also:
// woops
php -r "const A = []; const A = [];"
php: ./php-src/Zend/zend_variables.c:43: _zval_dtor_func: Assertion `(arr)->gc.refcount <= 1' failed.
18:34
@marcio heh
@marcio probably not a good idea
ok ty
oh, dang, goto indeed does not allow dynamic expressions =_=
@Ocramius Goto is very limited in PHP, that's a good thing.
@Ocramius that would be like super crazy
18:36
yeah, figured
Not even C supports that
(Disclaimer: GCC does)
Yeah, it makes sense, I'll probably just use a switch statement then
@Ocramius switch statement is O(n)
can't switch be reduced to a hash lookup in some cases?
nope
18:37
@Ocramius No, because ==
I know the engine doesn't do that atm, but assuming types are known
I mean it could be, but it isn't
That's what I'm looking at: "could"
@Ocramius I once had PR for that, but never merged
assuming 'string' and 'string', it could probably do that at some point
user6116249
18:38
can someone look at this please stackoverflow.com/questions/36726744/…
@kelunik Ostensibly. In reality it's not supported because it would create basic blocks with more than two successors
@bwoebi alright
don't remember why it was left unmerged
@NikiC We never cared about basic blocks before 7.0 …
@bwoebi We didn't? I think we did. IIRC the reason it wasn't merged was a) no complete opcache support and b) you going batshit crazy on types (i.e. trying to support absolutely everything, resulting in a complex implementation)
@Ocramius As long as one isn't a number.
18:40
In general it should probably be possible to have O(1) switch if every block has a different case, if every case has a break or a return and all case are of the same type
@kelunik yeah, does this pre-condition seem sufficient?
I wish == could just die at some point tho -.-
E_STOP_DOING_BULLSHIT_COMPARISON_OPERATOR
@NikiC I think b) might have been the cause and I think I now also understand why…
!!> switch ("0e1") { case "0e123": print "OK"; break; }
@kelunik beautiful (not)
well, let's assume I use only integers (which I can do while compiling down)
@kelunik yeah, that's one of the main problems with optimized switch
18:44
@Ocramius Let's setup a RFC to throw deprecation notices on it's usage and remove it with 8.0. :-)
gl deprecating ==
@bwoebi s/optimized//
@kelunik both is true
@bwoebi switch (1) { case 1: print 'OK'; break; case 2: print 'KO'; break; } should be optimizeable
only assuming type information tho
@Ocramius OH, don't deprecate, just make it strict with 8.0. :P
18:45
ah
@Ocramius meh… but we possibly should remove string comparisons on numericals in scientific notation
declare(strict_types=1) could also make == strict. :P
@kelunik shiny :O
that is actually a decent suggestion, given that strict_types is not so widespread (YET)
@kelunik script_types is meant to throw errors, not alter values of ops
@William Added an answer.
18:50
anyway, just looking at opcodes, see fcall in 3v4l.org/VVQtj/vld#tabs vs fcall in 3v4l.org/QUZgN/vld#tabs (not inlined)
@Ocramius your point is…?
My point is that I save a dozen method calls and stack frames per request or per service that is fire-and-forget (container used as factory)
@Ocramius right. That's the price of non-inlined code
(I mean, optimizer is not inlining it)
user924016
@kelunik declare(strict_types===1)
yeah, need to bring it up to definition-interop, I suppose
18:59
@RonniSkansing declare(strict_types==1) is enough I think :)
user924016
=) strict stricter strickicheeerzsst
19:24
Why SO let us to write multiple different answers for one question? Is there any specific policy? Isn't it better to tell us instead of writing another answer, just edit your previous answer?
Please answer me, I have a website like SO and I want to know should I let my user to write multiple answers for one question or not ..!
One of the most annoying parser behaviors is echo 1.$var giving a parse error…
user924016
19:43
#mrrobot season 3 spoiler https://t.co/3rtPPWdfcN
double-u, tea, èffe
Ekn
Ekn
lol
Wes
Wes
oh look, my tweet :B
@bwoebi Just use spaces before and after ..
@kelunik I know, but it sucks nevertheless.
19:54
@bwoebi As I always use a space before and after ., I don't care. :P

« first day (2012 days earlier)      last day (3161 days later) »