« first day (1641 days earlier)      last day (3531 days later) » 

00:00
wrong php.ini loaded?
\o/ I got it loaded:
> Segmentation fault: 11
lol
I was expecting at least one segfault. Glad to see I wasn't let down.
    frame #0: 0x0000000101a80609 opcache.so`optimize_temporary_variables(op_array=0x0000000100e06210, ctx=0x00007fff5fbfdcc8) + 217 at optimize_temp_vars_5.c:66
   63
   64  	    /* Find T definition points */
   65  	    while (opline >= end) {
-> 66  	        if (ZEND_RESULT_TYPE(opline) & (IS_VAR | IS_TMP_VAR)) {
   67  				start_of_T[VAR_NUM(ZEND_RESULT(opline).var) - offset] = opline;
   68  			}
   69  			opline--;
(lldb) p *opline
error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory
Happens in zend_optimize; clearly an optimization error. I'll just file a bug and someone else can fix it ;)
How does this SQL work?
tableName LIKE %:pdoexc%
I tried:
tableName LIKE CONCAT('%', :pdoexc, '%')
00:15
$x->bindParam(":pdoexc", "%" . $v . "%");
@Worf what's the $v
the param to bind
@Worf I've tried googling this, still don't understand. What would my $v be?
have you ever used php.net/pdo ?
Yes.
Only the: prepare, query, execute.
00:26
and you never used bindParam / bindValue ?
Never the bind.
check them then
@Worf Oh so it's a bit like execute?
But individually.
yes
Thanks.
00:32
i just noticed why method overloading exists. wonder what php would do to solve this:
class MyClass implements Foo<Baz>, Foo<Bar>{
    function interfaceMethod(Baz|Bar $foo){}
}
in java would be overloaded
class MyClass implements Foo<Baz>, Foo<Bar>{
    function interfaceMethod(Baz $foo){}
    function interfaceMethod(Bar $foo){}
}
cc @LeviMorrison you wanted to implement multiple type hints iirc
@Worf

$productFilterStmt->bindParam(":optionOne", "%" . $_GET['optionOne'] . "%");
$productFilterStmt->bindParam(":optionTwo", "%" . $_GET['optionTwo'] . "%");
$productFilterStmt->bindParam(":optionThree", "%" . $_GET['optionThree'] . "%");
$productFilterStmt->bindParam(":optionFour", "%" . $_GET['optionFour'] . "%");
$productFilterStmt->execute();
looks fine @RahulKhosla
Fatal error: Cannot pass parameter 2 by reference in
ah sorry, it's bindValue not bindParam then
00:33
i never use pdo directly, only through my wrapper
also @marcio check the generics example above ^
brb
@Worf I kinda love you right now.
Thanks!
lol, no problem
I literally spent 8 hours on this.
00:59
@Worf in PHP you're basically screwed :) 3v4l.org/kF7m2 & 3v4l.org/hBiFA
eheh, but maybe combining the two types as levi suggested could do the trick
yes because you no longer require that A and B are horizontal sub types of something else.
So A|B would be a win here.
i like that
@Worf PHP doesn't have method overloading, so it could never happen.
@Danack that's what i said :P
overloading on a dynamically typed language would be bad
(or is it?)
i imagine resolving the method to call at runtime an utter mess
not to speak of ambiguous calls
01:07
@Worf BTW I was thinking about the callable types overloading issue you posted here some time ago... I think that any callable should be able to overload any other callable because all callable types derive from callable anyway.
you mean allowing incompatible "callable signatures"?
yes, in the end they are compatible in some way because they are all child of callable
that's just accidental, no? it's not a real type
and it would be really hard to check callable sub types :s in cases like callable(A $a, callable(B $b, callable()))
hence my primary aversion to inlining the callable types :P
(it get's even hairier with return types)
was thinking about the equivalent made with classes:
function x(MyCallback $x){}
x(new class implements MyCallback {function _the_callable_(A $a, B $b){ } });
you only need to check that the callback has the leading non-optional parameters compatible, and allowing any optional parameter to have any signature
http://3v4l.org/biHVU as in this. optional parameters aren't required to be compatible with parent's optional parameters
nvm 3v4l.org/ljNjE error lol
nope, they have to be compatible
i guess it's fine for now allowing incompatible callables @marcio but they shouldn't be imho
that makes me think that having to write things like
callable(A $a, callable(B $b, callable())) $x
is an hell of a pain compared to
MyCallback $x
and your named callables start to have sense now
i mean the generics syntax is pretty short and is fine especially because combination of types (especially when nested) is not always predictable when designing an application. would lead to have dozens of types. instead callable types are pretty much always predictable and very limited in number
thoughts?
01:32
that's what I had in mind since the beginning + any discussion involving "generics" goes out of control on PHP land, I read the old discussions and it was chaotic :(
let's ask @LeviMorrison opinion, the kitten knows some shit
maybe they aren't "very limited in number" tho. imagine having to write
callable type stringListWalker function(string $value, int $key);
callable type stringMapWalker function(string $value, string $key);
callable type intListWalker function(int $value, int $key);
callable type intMapWalker function(int $value, string $key);
also having to name such things would stress me a lot :D
i think what's worse is the syntax which is not as short as generics, but you could add
<?php
use callable(A $a, callable(B $b, callable(C $c))) as Baz;
class A{ function test(Baz $c){} }
so named, but at file level
how about that?
wouldn't solve your inheritance issue tho :P just a different topic
also @marcio variables should be optional for reading (unless the named arguments rfc did it)
callable(A, callable(B, callable(C))) is enough in many cases
callable(string $key, string $value) use variables only when needed
should = could
02:29
@Worf nono it's:
callable stringListWalker(string $value, int $key);
callable stringMapWalker(string $value, string $key);
callable intListWalker(int $value, int $key);
callable intMapWalker(int $value, string $key);
or in case of type aliases:
type stringListWalker = callable(string $value, int $key);
type stringMapWalker = callable(string $value, string $key);
type intListWalker  = callable(int $value, int $key);
type intMapWalker = callable(int $value, string $key);
my point was that naming them would be tough and would lead to too many types
also callable stringListWalker(caniuseacallablenamehere $value, int $key); // lots of redundancy
sure, but I couldn't resist fixing the code :D
:D
so it's a no imho, do you agree?
instead per-file shortcuts would be fine
use callable(A $a, callable(B $b, callable(C $c))) as Baz;
you mean the use <inline type> as? For me it's a "no".
i mean named callables as you proposed them
instead named callables per-file (just aliasing, basically) would be handy
02:35
I still prefer to have named callables through type aliases because it fit's better on the big picture with the other RFCs
too many combinations, and naming things is hard
and type aliases is another step|opportunity to "fix" the PHP type system even though it's verbose.
@Worf with type aliases you can: type Baz callable(A $a, callable(B $b, callable(C $c)));
but "official names" are tough (while aliases can be anything you want and you wouldn't care if they aren't fancy)
also introducing new named types for php will surely be the perfect opportunity to name them wrong LOL imagine having to name all the callable types used in the string and array functions. it's going to be a disaster i'm pretty sure of that
also, should the name reflect the signature:
callable StringToString(string $value) : String;
or should it expose the callable intentions?
callable Replacer(string $value) : String;
the latter i suppose, then the named callables would be way much more.
idk.
02:57
@Worf Intentions.
But some would say that's interface territory
yeah, then a shitload of new names
But I wouldn't personally name them.
i agree
apart from file-level aliasing @LeviMorrison
<?php
use callable(A $a, callable(B $b, callable(C $c))) as Baz;
class A{ function test(Baz $c){} }
that is welcome instead
It's less clear to me what's happening there, honestly.
I would prefer:
class A {
    function test(callable(A, callable(B, C)) $c){}
}
(or something like that)
Realistically it's more like this for me:
yes that and optionally aliased as in "use callable...."; for long ones
03:02
function map<F,T>(callable(F): T $f, Iterable<F> $input): Iterable<T> {
    foreach ($input as $value) {
        yield $f($value);
    }
}
^^
:D that would be great
that's a +1 for mixed type hints
 
2 hours later…
05:17
@ThW soooo, fresh day: lets do this ^^
05:57
good mornings
@MarcelBurkhard: You seem to have plans for today :)
My plan right now is to get moar coffee
mornig
you know what I'm gonna do today ?
NOTHING
how do i uninstall all of PHP ? i'm on ubuntu i have a mix of php7 , php5 built from source some of them build from sudo php5-cli and php5 and now when i run phpize i get Cannot find build files at '/usr/local/lib/php/build'
i tried to uninstall them but some of these are stuck
i think i'm gonna reinstall ubuntu :)
06:17
y u no use correct gravatar @SOChat ?
06:28
Hi, all of you please have a look this image prntscr.com/6tiwhb i want to insert this data in db, but requirement is that each medicine row should be insert in db with new row. please help me
good mornings
@SergeyTelshevsky can you make it a usb power bank? :D
It's not mine
and I never worked with 3d printing
I take that as a no
right :)
this is the best benchmarking article ever: print vs echo
3
07:00
moinz new peepz
@SergeyTelshevsky :P
07:21
@SecondRikudo for president? :p
@Muddasir Abbas As I assume you can add any number of meds through that form, why not to make another table for meds and join these tables with on patient_id row? Then you can have one record in patient table and multible records (one for each med) in another table where patient.id = medicine.patient_id
@Naruto I actually hope deceze makes it instead
@PeeHaa havn't voted yet, but I was scrolling trough the candidates, and I noticed him :P
good morning btw :)
@Naruto IIRC he tried it for the last 3 or 4 years
Havn't been member for that long :P Nor was I able to vote :)
07:24
noob! :P
@PeeHaa Although this time appears to be different
Perhaps thanks to the moderator score
@SecondRikudo Moderator score?
Also morning
@SecondRikudo when are you going to change your profile pic again? :P
also, o/
I voted for both deceze and madara
@Naruto Maybe after the elections
@PeeHaa 40/40
07:39
@SergeyTelshevsky "So I think the morale is pretty clear: next time you want to optimize your scripts, please think about dying first. I think you'll save everyone a lot of time!"
Btw I wonder why I couldn't sign up for moderator elections. Is it because I lack a meta participation requirement?
(I don't have the convention badge)
@HamZa that and a lack of reading comprehension
@MarcelBurkhard thanks for the acknowledgment
@HamZa no offense ;)
For the Stack Overflow election, an eligible candidate for the election **must** have all of the following badges:
...
Convention
07:45
I've read that, I just was surprised that it was actually strictly implemented
Damn, who even cares about meta
I don't
but I don't exactly care about the election either
I see
@PeeHaa good weather today. So go do something fun :P
@SecondRikudo I understand, gotta stay professional, untill you are in ;)
@HamZa Work work :P
08:00
@PeeHee for Moderator *waves cheerleader pom-poms*
@brack11 will you please let me know when i submit this form and go to next page how can i get this page date and insert in to db. i am stuck please help me how to insert multiple insertion in to db according to my condition Thanks.
@salathe BTW who can reset votes on user notes?
@prdtuty var_dump($show_cart) and I think you will figure it out yourself..
08:18
@prdtuty "Undefined index" means an index is undefined
@Naruto I tried it and returns bool(false). Couldn't exactly spot the error.
@PeeHaa anyone with an account, as far as I know... why?
I dunno how to do that
Hi!
@PeeHaa Hey!
08:31
@JoeWatkins haha, what else could it be?
@salathe I tried to clear votes on a cleaned up user note a while back, but it said I wasn't allowed to do that
@Eugene hey
Quick Q guys. Is there any naming conv. for types of structures like class, abstract class, interface, trait?
I did find that info github.com/php-fig/fig-standards/blob/master/bylaws/…, but I'm not sure wether it is correct or even needed. What is your opinion of that?
posted on April 14, 2015 by kbironneau

/* by DerSeegler */

0
Q: HowTo? Debug PHPMailer function as it is not working

Tim SalabimI have a couple of websites and my host has PHPMailer enabled. On a wordpress site I also installed a plugin which returned this result: bool(true) The full debugging output is shown below: object(PHPMailer)#81 (69) { ["Version"]=> string(5) "5.2.7" ["Priority"]=> int(3) ["CharSet"]=>...

08:42
@Eugene maybe useful for example code, not needed for real code but also not necessarily objectionable if found in the wild
Asking due to my IDE choice (in this case PhpStrorm), since it doesn't have class icons like Intrllij IDEA, which is logical.
it doesn't? weird. (I just use idea with the php plugin)
@salathe lol even more hard coded fun :P
@PaulCrovella well I like to use dedicated IDE rather than plugins
Like WebStorm for frontend work, rather than idea with plugin
ThW
ThW
08:49
Morning
@Eugene They're all lower case, the actual types
@prdtuty then there are no results?
http://t.co/bnM2Tc6RwE
@salathe I also love how I could probably let you delete everything because it seems there is no csrf protected
@Naruto Thanks for your help... Found the answer.. Failed to increment the quantity..
08:58
Damnit I want to fix this thing, but I am, pretty scared to even look at it :(
@PeeHaa I never click links coming from @PeeHee!!!
huh, what happened to the pinned messages, is that not a thing here anymore?
@salathe yeah I might just go in at some point and at least fix the biggest wtfs
Someone went power-crazy and unilaterally decided to un-pin all the stars!! (maybe)
Is it hard to setup locally?
09:02
@PeeHaa Nope, it should be a matter of 1. git clone 2. ask webmaster list for copy of database 3. php -S ... :)
Awesome
If it's not, you can fix that too :P
hehe
hahahahahhahaha
md5($_REQUEST['token']) != "19a3ec370affe2d899755f005e5cd90e")
It's super effective :P
@salathe Can I just PR against your repo?
Anonymous
09:24
@Danack can u re-review the doc? thanks
re- is redundant in that sentence.
like saying you should re-rewrite it.
@PeeHaa You can... I might just ignore it though :P
neh you won't :)
hi guys anybody having experience in smsgatewayhub
then ping me
i got this error "Invalid template or template mismatch"
how to solve that??
@PeeHaa :P
@PeeHee even if you do make a PR, send a mail to the webmaster list too
09:39
Hello everybody
low
what is a good way to deal with something like this in my view
<? if($url){ ?>
    <a href="<?= $url ?>">
<? } ?>
this is just so ugly and unmaintainable
it depends on your perspectives , before i tried using php echoes "<a href="{$url}">test</a>";
but its very annoying if you have dozen to concat
Hey everyone!
well, basically I just need to omit the opening anchor and the closing anchor tag
doing this with if-statements makes me shudder
09:44
so basically the href only? if so
echo ($url) ? '<a href="{$url}"'>test</a>' : '';
@GNi33 why?
because it's ugly as hell :/
<? if($url){ ?>
<a href="<?= $url ?>">
<? } ?>

    <?= $item->getTitle() ?>

<? if($url){ ?>
</a>
<? } ?>
@GNi33 then maybe you should use the template syntax instead of brackets
well that example does look weird
why not just do an if else? maybe the title needs a span or something else in the future
By the way all , i need a logic on my problem
i have implemented a facebook style wall post , reply , comments, chat but i'm using a jquery ajax setInterval
i was wondering if using setIntervals will make my site , lagger?
hi guys
09:50
fetching data every 10seconds
Anonymous
@boyee nope
will this logic works if my site would have a huge traffic?
Anonymous
yes
Can MTN Mobile money procees api be integrated with php? can any one help me?
i have read using websocket , or long pulling
09:51
i develop a website using PHP and it is ready now
i also purchase a domain name
i also have windows server and install wamp on it

Can i host this website on my windows server , So users can access it using domain name
?
i'm not sure about this websockets
Anonymous
@user2763731 if it is in json format, yes
Anonymous
@boyee websockets are not supported in some cases
Anonymous
@Bassem yes, but it needs a little bit of work, adjust you doman dns records
Anonymous
@boyee check out xmpp
09:53
@samayo , my A Record now of my domain name points to my server ip address
i have no problem with that
@samaYo cool then
Anonymous
@Bassem good, but why did you chose windows server? why not linux?
This is very approximate example you need to insert all php commands yourself "INSERT INTO patients (name, address) VALUES('test', 'test');"
INSERT INTO medications (patien_id, med_name, reception)
VALUES(LAST_INSERT_ID(),'Some med', serialized());"
@salathe kk
because i only have one server and have many apps that work on IIS (on another port (not 80))
@samayo
@samayo , did u try something like that php.iis.net ??
Anonymous
09:59
nope
Anonymous
90% of the developers I know use linux
Anonymous
so, you will have harder time getting help for iis
so what do u recommend for me to make it works on windows server
Anonymous
I guess keep asking or checking online till you get help
@Bassem buy a linux server
Anonymous
10:02
why do u see when going to ur domain name?
We use windows at work and it's a big pain in the ass
@samayo , if i run IIS , the page of IIS appeared
if i disabled IIS and Run wamp (Green icon)==>Page can't be displayed !
can i convert my windows server to linux ?
Anonymous
yes
Anonymous
wait.. depends.
Anonymous
if you run a virtual machine afiak
10:06
i have no exp with linux , but i can work on cpanel
so can i install cpanel on linux ?
Anonymous
you can run cPanel on linux also
wow
ok i will google
it
Anonymous
@Bassem did you set up your apache http.conf file ?
yes but not sure about it's configuration
it is too complicated
Anonymous
not really, just open bin/apache/ and somewhere inside you'll find the config files ...
10:10
i know that file
but how to configure it to make it accessible from outside it is the problem that i face
by default it is installed to be accessed from same pc only
Anonymous
i would've tried to help you, if I had iis
Anonymous
I have also heard, wamp is not suitable for production use
I have IIS, but I would rather not deal with it more than I have to... Get a *nix and thank me later
Anonymous
@Patrick I would like to work with someone on opensource project, on github ... if want to collaborate or need anyone let me know.
Anonymous
10:26
I'm looking to spend some time to work on anything
@samaYo then send some pull requests. Or what do you mean?
Anonymous
I did, once!
Anonymous
imho the http lib is finished
Anonymous
unless you want to remake it with psr7 standards
Anonymous
But something new and not as common as http library would be much more motivating @Patrick
10:35
@samaYo I don't think so. Right now it is just built like the php superglobals. I would prefer if it was separated better. An object that represent a visitor, request data etc
Right now if something depends on a request it has way too much things
But if you want to write something from scratch, a good session package would be nice
Anonymous
@Patrick yeah, that would be good. But, I need someone commited for the help and motivation. I don't want to make anything by myself only, as that would only mirror my understanding of things.. which is why, I am willing to start a small project if you/anyone is upto it :)
@samaYo But that's good. You don't want to be a codemonkey for someone else. Instead design things as you understand them, then ask here for feedback. After many iterations, you will have learned a lot and I'm sure something good will come out of it.
Just don't expect the first version to be perfect :)
We had a guest lecture about PKI & TLS. If you're not well familiar with it, it might give you some insight: youtube.com/watch?v=QmixCgQzsGo
Jay
Jay
11:28
@HamZa Thanks
@Jay welcome
11:46
fucking, yay
New PC is coming, from @OverclockersUK ... #excited http://t.co/OMGPZjDaIA
that was a large bill ... totally worth it ...
What got you to buy one in the end Joe?
the best i7 money can buy, 16gb DDR4 ram and a new mobo
5960X
@JoeWatkins You too serious in your new picture :P
oh and a generic (vertical) case ... I think mounting cpu horizontally contributed to it's demise
@Jimbo if the sun was on me, you wouldn't be saying that ...
I have a purple beard ... in some lights ...
Hipster Joe
11:53
Codes on a typewriter.
it's very dark ... I'll do next one outside ...
Outside... sounds scary.
I go out there all the time now ...
because dog
by the time I've had him a month, I will have walked 150km, and have already lost a stone and a half ... we should all have dogs ...
@JoeWatkins I can deal with metric and imperial, but stone... :D
Nice
stone * 14 = lbs
stone * 6.3 for kgs
11:57
So that's about 10kg lost? that's pretty awesome
it's remarkable yeah ... trying to walk him three times a day and eat a bit tidier ... I guess it'll slow down after a couple of months ...
Yeah, key point to remember is it's not a single progressive line. It will stay the same for even weeks, just keep going and it'll drop again
Anyhoo, off to get my, hopefully final, leg x-rays. Ja ne!
lata, gl @Fabor
@JoeWatkins you walk him 3 times a day?
at the weekend, always, but some school days only getting out twice, but covering at least 8km a day now, some days 2x that ...
12:07
hmmmm... depending on how old he is you might want to confirm that it's safe for him. Dogs can easily over work themselves... and get some joint conditions
I think it should be okay if he's old enough and you can handle it, though.
oh yeah I've been lots of reading ...
10k seems okay for his breed and age, but some days I struggle to do that still ...
Anonymous
@JoeWatkins link pls? I can't zoom in and see the details.
12:22
details of what ?
Anonymous
I'm trying to buy a new pc, and I need to know about your choice
Anonymous
thanks
Anonymous
oh, I thought it was a laptop
Anonymous
Mar 31 at 15:59, by sam_io
http://www.laptopmag.com/best-laptops. Dream laptop
Anonymous
12:25
@JoeWatkins this one ^^
Anonymous
dell xps 13"
how do you get shit done on a 13 inch screen ??
I was about to ask that...
How many lines of code can you see per time?
@JoeWatkins to answer your question, shit can be done easily on any screen, especially 13"!
Can someone help me please, what i do wrong here? I want to access function: recalculateLevelDepth($id_category), i try so: CategoryCore::recalculateLevelDepth($category_id), but this function don't get my call.
12:34
I got a tape measure and measured 13 inches, I'm not being a screen snob, it's a genuine question
it's only a little bit of one of my screens and I struggle to get stuff done with one screen ... I need two to be really productive ...
can't imagine myself working without 2 widescreens with 1600+ resolution
Anonymous
I haven't tried 13 yet ( i have 15 now) , I am told 13 inch is a pain in the arse. But, since I mostly code at home, also with a separate 22 inch monitor, I could use that. 13 seems best when going outside, sitting in a cafeteria and just do some simple things. @JoeWatkins
Anonymous
gotta get some of that fresh air.
@ThW stumbled upon this: http://stackoverflow.com/a/23796070/982075
:D
I want a dell xps 13 too
3200x1800
but I don't think I would be as efficient as on the 27" 2560x1440
ThW
ThW
12:52
@MarcelBurkhard :-)
@ircmaxell A reference that may be of use - an example of why showing 'secrets' are bad
@Danack haha nice... I watched a live stream two days ago where someone showed his gmail mailbox ("GuyXY sent you 100$ on PayPal") etc.
live streams are quite dangerous for the streamer...
getting your GTA V key stolen is probably a bit worse ^^

« first day (1641 days earlier)      last day (3531 days later) »