« first day (4634 days earlier)      last day (539 days later) » 

12:37
Hey. I was trying to port my old implementation for adding Url class to the standard library (fun weekend project, I am not even gonna bother with RFC) :) I see that internals have been changed drastically. Can anyone help me find where/how function/module definition should be done for these? github.com/leri/php-src/blob/php-src-url/ext/standard/url.h Thank you so much
Just curious why were these definitions removed from the headers?
@Leri heap.space is probably useful...
Oh, cool, thanks I was reading old internals book it seems.
though I don't understand exactly what you are asking. Are you asking where stuff currently is, or where stuff could/should be setup? If it's where stuff should be setup, I'd create a url_class.c file somewhere, and then add it to the standard extension m4 file, where the other source files are listed.
@Danack I was asking how things have changed. Thanks, I found my way already. I liked how things were though. :) But it's just me living in 2013 still
13:42
honestly, looking back, I think I liked how things were before about September 2001...
 
6 hours later…
19:38
Any idea how can I write this logic better?
$metadata = [];
if (!is_null($email)) {
    array_push($metadata, $email);
}
if (!is_null($mobile)) {
    array_push($metadata, $mobile);
}
It works well now, but looks like written by a junior 🙂
19:51
@Shafizadeh If they can't be empty strings, then using $metadata = array_filter([$email, $mobile]);, See 3v4l.org/2no1X for four testcases demonstrating how it works
OTOH, sometimes it's best to stay away from fancy things and write it the less fancy way if it makes code clearer
I see, thanks

« first day (4634 days earlier)      last day (539 days later) »