« first day (1600 days earlier)      last day (3341 days later) » 

12:05 AM
@PeeHaa I had a similar experience after installing some graphics drivers from a PPA, it said to remove them run <some command>, so after X died in a fire, I ran that command. It uninstalled every package (including the kernel)
I've spent the last 3 hours trying to hook and override parse errors to extend the language syntax from an extension (by any means necessary - even if it's a hack). I think I'm at the point where my only option is to start detouring jmps in the parser. I should probably stop here.
 
There was a fire and you ran a command instead of running away? ;-)
 
I never got that about fire drills. It's my decision how long I want to stay in the building for...
 
12:22 AM
@Leigh it's to train people to get out of a building if they see smoke, because people in groups are idiots. There have been some cases where i) a building has been on fire ii) everyone stayed in the building....because everyone else was staying in the building.
 
I worked on the 2nd floor of a 2 story office, next to a window, and 2 meters from the fire escape, which also had a couple of fire extinguishers next to it. I'm fairly confident if there was actually a fire I could either escape, or hallucinate and use the fire extinguishers as a make-shift jetpack while dying horribly
 
here it is:
bloody humans.
> When two passive confederates were present (two people that were working with the experimenters who were instructed just to act as if nothing was wrong), only 10% of the subjects in this study actually got out of the room or reported what was ostensibly a serious problem. 9 out of 10 of the subject actually kept working on the questionnaire they were given, rubbed their eyes, and waved smoke out of their faces.
 
bladdy oomans
Danack are you back in oz?
 
@Leigh Nope - staying in the UK I think.
 
ok, you seem to be up odd times
just curious :)
 
12:34 AM
@Leigh dat insomnia.
 
tell me about it, I'm here to notice it, after all :)
 
Technically it's not so much insomnia but just shitty sleep schedule - I think you know I knackered my back, well that's almost completely better, but the tendons in my neck are having to adjust to a slightly different position....and it means my neck is a 'bit' sore constantly. It's not that painful - it just makes it annoyingly difficult to get to sleep.
 
Also have back issues, once I'm laying in the right position I'm fine, until I have to change position. It's the moving that's a problem
 
You been to see a chiropractor or other witchdoctor?
 
Nah, offlicense
it comes and goes, old rugby injury. I don't think there's any permanent fix
 
12:42 AM
Same - it's actually slightly bad, and I will need to stop drinking so much when my neck is better. But as the choice some days is between i) drinking ii) taking painkillers which are seriously addictive iii) having the full effect of the pain - pass the beer bro.
 
I had some second hand tramadol, but that's run out, so yea, beer time
 
This is a bug isn't it and not by design: 3v4l.org/7jiKl (The difference in behaviour)
 
I couldn't say...
Have to see what the specific commit was doing I guess
 
already reported - bugs.php.net/bug.php?id=69172
 
and the test script is identical, the chances :D
 
12:57 AM
It's from github.com/composer/composer/pull/3806 - the bugger didn't link the reported bug...
 
1:34 AM
So, I am browsing the github repos of this company I had an interview at..
if (preg_match(...) || preg_match(...) || preg_match(...) || preg_match(...)) {
    $var = preg_replace(...);
    $var = preg_replace(...);
    $var = preg_replace(...);
 
@Leigh just the once, or is that repeated everywhere?
 
well in this file, it's a big function like that
it also has a function with around 12 if statements doing a single numeric comparison (without braces) that return values... hello.. switch calling
method names are mixed between camel case and underscore delimited... argh
I have to close this tab before I write a shitty email
 
Oops - been 6 hours. Better restart Chrome.
"zend_mm_heap corrupted"
Oh php.
 
1:56 AM
@Danack sounds like a bug :-D … or is it your C code?
 
freeing something that should just be destroyed and left for the mm to clean up?
 
@bwoebi It's in stock PHP 5.6 in amphp/dns....I'll grab some info and post an issue. I'm unlikely to be able to solve in straight away...
 
@Danack You have a repro case?
(It's fine if it's based on amphp/dns too … as long as no other libs except its dependencies are involved.)
 
In the sense it's happening all the time yes. On centos 6.4 with a custom PHP compilation, hosted on an OSX box.
 
@Danack does it happen on OS X too?
 
1:59 AM
I can't test - I have php5.4 on osx and can't be arsed to upgrade, and the library doesn't work on 5.4
Is there a way to get more info when PHP says zend_mm_heap corrupted? Valgrind is showing nothing.
 
Is ($a <=> $b) === 0 equivalent to or only implied by $a == $b? (@Andrea maybe?)
@Danack just give me the repro script, I'll look at it
 
@Danack Just a question… is imagick.test a hostname defined in /etc/hosts or not?
 
yes - it's listed.
and works fine.
 
so, where's the issue?
 
user895378
2:11 AM
In php-src it sounds like.
 
a backtrace would be nice :)
actually, I guess by the time zend_mm knows the heap is corrupt, we're well past a relevant backtrace...
 
yep
 
@bwoebi added to issue, but the output is:
 
user895378
I've seen that behavior before when you do something to get stuck in an infinite loop and max out memory with amp.
 
# php 002_async.php
    github.com => 192.30.252.131
    google.com => 62.24.157.49
    FAILED: imagick.test
    stackoverflow.com => 198.252.206.140
    localhost => 127.0.0.1
    192.168.0.1 => 192.168.0.1
    ::1 => ::1
    zend_mm_heap corrupted
 
user895378
2:12 AM
Try adding something like this:
 
user895378
yield 'repeat' => [function(){var_dump(memory_get_usage());}, 1000];
 
user895378
To dump memory info every one second just to see what happens.
 
how come it doesn't complain about exhaustion during the lookup?
 
@Danack on my OS X install I get the same output… but no zend_mm_heap corrupted…
 
... firing up some vms
 
2:15 AM
@bwoebi I was getting it everytime, it's not doing it every time now though.
 
user895378
@Leigh I dunno, it was just a guess :)
 
@Danack but it's 5.6.6 locally… maybe a bug which had been fixed since 5.6.2?
 
@rdlowrey the script only takes a second to complete - but doing var_dump(memory_get_peak_usage()); gives a segfault.....and those are traceable.
 
@Danack what's the IP for imgick.test? and what 5.6 point release?
 
@Leigh 127.0.0.1 and 5.6.2
==10877== Invalid read of size 8
==10877==    at 0x7EC1C9: zend_mm_remove_from_free_list (zend_alloc.c:815)
==10877==    by 0x7EC422: _zend_mm_free_int (zend_alloc.c:2105)
==10877==    by 0x817104: zend_stack_destroy (zend_stack.c:99)
==10877==    by 0x803868: shutdown_compiler (zend_compile.c:240)
==10877==    by 0x818F18: zend_deactivate (zend.c:966)
==10877==    by 0x7AB840: php_request_shutdown (main.c:1884)
==10877==    by 0x8C94CE: do_cli (php_cli.c:1177)
==10877==    by 0x8CADDC: main (php_cli.c:1378)
 
user895378
2:19 AM
works fine for me with php7
 
@bwoebi That's a good point - I'll restart the vm with 5.6.5.
 
@Danack when I add an entry in the hosts file, it resolves correctly for me… not sure why it shows up as failed for you?
 
@bwoebi did you put it on the host or the guest?
 
I don't have a VM here…
bob$ ls ~ | grep 'php-src'
php-src-5.5
php-src-5.6
php-src-7
php-src-7.0
php-src-X
php-src-ba
php-src-return-types
@Danack ^ I just have various php installs in my home dir locally… not messing up with system php binary either.
 
wow, composer update in amphp/dns downloads a lot of shit
 
user895378
2:26 AM
@Leigh yeah. I had nothing to do with that.
 
@bwoebi Don't most people use checkouts for that sort of thing?
 
user895378
It's because of that dumb predis dependency.
 
every time I see symfony/yaml I want to puke :p
 
user895378
We need to migrate that to the amphp/redis lib
 
@Sara Not sure how you mean this?
 
2:27 AM
@bwoebi cd php-src && git checkout php-5.5 :p
maybe with a git stash in there if you've been a busy bee
 
@Leigh stashing around too much can have a bad outcome…
@Leigh Also… It's nice to have a binary available without recompiling each time…
 
@Danack can't repro with freebsd host and debian guest, hostfile entry on the host (php 5.6.2 tag)
bsd is the closest I have to osx
 
@Leigh I can't reproduce it either - and the dns lookup is still failing from inside PHP but works fine from the command line. I'll stace it tomorrow....
nn.
 
o/
 
user895378
@Danack later
 
3:06 AM
It's sad by hypot($x, $y) is a little bit slower than sqrt($x * $x + $y * $y)...
 
in Tavern on the Meta on Meta Stack Exchange Chat, 28 secs ago, by Doorknob
Doesn't the PHP room have a cv-plz onebox userscript? I should get that.
Is this a thing?
 
3:29 AM
@sectus How much slower is it?
 
What is the better practice in PHP for forms. In the action field, is it recommended to refer to an external file or to the same file?

For example:

<form action="">
Submit with 'submit' command
</form>

Then in the file at the top have a

if(isset('submit'){
Some code
}
 
@Ja͢ck near 9%
 
Or is it just better to use another file.

<form action="other-file.php">
Submit with 'submit' command
</form>
 
user895378
@Undo I think you can find whatever there is to find here: github.com/Room-11
 
@deathtap it's up to you. But, common practice to use one file for all requests.
 
3:35 AM
@sectus Even if it becomes huge? I have a file with up to 7 requests, each one attempts to open another file. It used to be in an external file and avoided the PHP redirect error. Now that I have it within the same file, I have to use an HTML redirect to get it to work. I think this isn't really optimal, but it works.
 
@deathtap , so, it's up to you. FWs use one point of entrance.
 
FWs?
So there is no preference? For security reasons or something?
 
frameworks
 
You guys taught me to use PDO and bindValue, so I came here to clarify this thing.
Ah, I designed this one from scratch.
Thanks!
 
@sectus Hmm, I doubt that's a PHP problem.
 
Exactly.
 
two zend_parse_parameters instead of one.
 
Nope, only one.
One more argument, though ... but I can't believe that would lead to 9% difference.
Due to the macros I can't tell which path is taken, though.
The difference between hypot() and doing sqrt() over the quads is the potential under- or overflow.
So perhaps that might explain the performance difference ... what's your test code?
 
That one's hilarious haha
 
user895378
3:53 AM
I just saw hypot() and couldn't help myself.
 
"I wish I was high on potenuse!"
while ($e_coyote) { try { invent_stuff(); } catch (RoadRunner $r) { break; } }
 
hi, is there something like dir command for sql prompt
?
 
and what would you like dir to do?
What's this security issue with script inclusion, again? Sigh, why am I even reading that thread ...
 
to see what tables are inside my db
 
show tables;
You can also ask SQL to get a little kinky; show underwear;
 
user895378
4:01 AM
@Ja͢ck it's stupid. Don't read it.
 
;D
0158: unknown SHOW option "underwear"
 
Hey, guys I am working a RFC to allow class constant visibility control, here is the early draft. wiki.php.net/rfc/class_const_visibility what do you guys think about it ?
 
4:17 AM
@ircmaxell Yeah I'm going to be in NYC the week of March 16-20. Speaking at PHP LUG on Monday in particular. Why do you ask?
 
@Ja͢ck "mysql query return empty result" Lol
 
Hey Josh, Good to see you here ;-)
 
@Ja͢ck Hello everyone and sorry Jack, If you mind it. This is first time I joined chat here on stackoverflow. :)
 
@reeze good to see you too! I'm here only intermittently though
 
@reeze not sure. If you care about scope… why not just use a static private property?
 
user895378
4:31 AM
@bwoebi fyi the openssl stuff is finally totally working for me locally :)
 
@rdlowrey \o/ push it \o/
 
user895378
Looks like adding OCSP stapling support for stream clients should be pretty easy too.
 
user895378
Can't push yet ... still have to update all those test certs now lol
 
@rdlowrey that's for tomorrow :-P
@rdlowrey Oh, you still haven't done it…
 
user895378
yeah the whole reason I went off on this tangent was because I started updating the certs and was like, "WTF all these tests are failing for other reasons"
 
user895378
4:33 AM
Anyway, calling it a night. Should finally be able to push some progress tomorrow.
 
/me has slept half the afternoon and can't sleep now at all :x
 
@sectus It's not fair to do performance tests on 3v4l.
 
@bwoebi there are some differents, static private property are mutable (I know for best practise one should not do that), constant are immutable. this is one case, protected class constants seems more useful.
 
@Ja͢ck , no, test was on my local debian machine. 3v4l just for sharing.
 
user895378
I would like to see private class constants be a thing ... I often abuse private static because I don't want some constants in the public API.
 
4:36 AM
@reeze they're mutable, but you as the author are in full control of the class. As long as you don't change it in class… well.
 
@sectus I get sometimes faster, sometimes slower on my machine.
 
@reeze currently, my experience is… people just copy values from private static properties, because they can't access it (which is even worse).
 
Btw, you can do sharing using pastebin; sharing this via 3v4l hogs their machines, be nice :)
 
ok
 
@rdlowrey constants are always bound to an use. It's like you define const ROW_CALLBACK_OFFSET = 5; and your $callbacks array is private… and then someone uses YourClass::ROW_CALLBACK_OFFSET in his code. It just makes no sense. It's not even about encapsulation.
@rdlowrey Though, when someone wants to inspect state (e.g. for debugging purposes) and extracts the array via Reflection, he'll happily use your constant… or well, if it's private copy it's value, which is nonsense.
Constants aren't API.
\cc ^ @reeze
Or well… I'm sure you could imagine making your default ciphers a private constant. It will only annoy the one who wants to assert that there's at least the sha-1 cipher in the list to be warned about future breaks…
 
4:48 AM
0
Q: Trying to understand array_diff_uassoc optimization

sectusIt seems that arrays sorted before comparing each other inside array_diff_uassoc. What is the benefit of this approach? Test script function compare($a, $b) { echo("$a : $b\n"); return strcmp($a, $b); } $a = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); $b = array...

 
And … as said… especially constants shouldn't have a visibility. They are immutable and it isn't important what visibility they have. One always just can copy the value - as their value is constant over all the executions.
 
@sectus If you don't sort, it would be O(n*n) I believe.
Though, with sorting you could still end up with O(n*n) in the worst case ... but it has an O(n log n) potential.
 
But comparing ignores any sorting. It just get value from array1 one and compare with each value from array2 until it match.
 
What do you mean by "comparing ignores any sorting"?
 
Yeah… I'm going to write an answe…
 
4:59 AM
As far as I can remember from the implementation, it finds the differences in O(n).
 
@Ja͢ck , Comparing part starts from first element of array2 every time for all elements of array1
 
user3949359
Does anyone know how to display the Ubuntu 14.04.02 terminal (ctrl + alt + f1) by default when starting up the VM, as opposed to the GUI?
 
Well… weird
 
how can i download php.ini and sendmail.ini file only? I've made some changes to that
 
Mornings
 
5:52 AM
@bwoebi, so... is there any benefit from sorting in array_diff_uassoc optimization function?
 
As said, currently redundant === no.
There is potential benefit, but currently, no.
 
Morning
 
@bwoebi , it's not quite clear from your answer for me. Also, you've linked to array_diff instead of array_diff_uassoc
 
@sectus they share their impl.
php_array_diff(INTERNAL_FUNCTION_PARAM_PASSTHRU, DIFF_ASSOC, DIFF_COMP_DATA_INTERNAL, DIFF_COMP_KEY_USER);
@sectus ^ that's the body of array_diff_uassoc.
 
@ircmaxell it's never nice when you use llvm :)
morning
 
Now, it's clear. Please, update the answer that array_diff_uassoc and array_diff uses the same part of code.
 
morning guys
 
@sectus great I could help… and updated ;-)
 
what php command am i thinking of if I have a php function storred in a variable that will dump the php into processing?
 
well… good night.
 
6:09 AM
like an echo
 
2 hours ago, by bwoebi
/me has slept half the afternoon and can't sleep now at all :x
 
nn bob
 
thanks
 
any ideas?
like storing all functions in atabase, then you dump it to the php processor
 
7:08 AM
good mornings
 
7:19 AM
morning
any clue what's wrong with this PHP:
function validator($verify, $pass_value){
echo $verify;
foreach($$verify as $key => $value){
echo "key: $key, value: $value <br />";
}
}
$_POST['testing'] = "this works";
echo $_POST['testing'];
$verify = '$_POST[\'testing\']';
$pass_value = "\$outputed";
validator($verify, $pass_value);
 
foreach($verify as $key => $value){
you have $$verify
 
what should i change to make the function return T/F?
one more issue: Invalid argument supplied for foreach() in
 
what do you want
$verify must be an array
 
it's a variable verifier for any type of variable expectant to be passed
 
7:27 AM
what would I need to do for a generic T/F checker/setter?
it's 1:30 AM in the midwest here
 
2:30 here
 
I don't know waht do you want
yes AM
 
a plug in for an if, and also setting the var
or would that take 2 functions?
 
you want something like this? stackoverflow.com/a/28847170/3653989
test the codes
 
7:30 AM
posted on March 04, 2015 by kbironneau

/* by HadesCH */

 
how do I use classes now?
i'm working on a platform for volunteer developers to work with nonprofits
and people are more familiar with functions
 
@eyeLoveFiddle why are you trying to echo $verify if you don't know whether $verify is an array or not
 
to test if it's getting set properly
 
var_dump($verify);
if (is_array($verify)) {
    foreach ($verify as $key=>$value) {
        //you codes
    }
}
 
what's var_dump do?
nvm print_r
 
7:42 AM
@eyeLoveFiddle rtfm
morning room
 
tip: before asking, try Google
 
morning
k
@Patrick can you see if you can figure out what i'm stuck on
i'm trying to write a setter function, and a verifier function
 
@eyeLoveFiddle show the code that you already have on a pastebin
 
sets genericly based upon these vars
setter($verify, $pass_value);
 
if you don't have an object that stores state, how does a setter make sense? what state are you setting/changing?
 
I have no idea what you are trying to do
 
you're saving some typing, and rechecking
instead of typing ifset, and not null, it's verifying on its own
 
@eyeLoveFiddle how long have you been programming?
sounds like you could benefit from working through a basic tutorial
 
i saw i forgot to show what I was originally trying: paste.jesse-obrien.ca/1P6C
 
$_POST['testing'] = "this works"; is mighty awkward
 
7:53 AM
@eyeLoveFiddle look up form validation
 
that does set it for verification reasons
once i get the function to work, it will run with real data
 
@eyeLoveFiddle how long have you been programming? (so I know what will help you the most)
 
hey guys i have a quick question hopefully someone is good with regex. I'm using an apache rewrite rule to make my urls look better. it takes a url such as site.com/forum/posts/general-discussion/ and turns it into site.com/forum/posts/?topic=general-discussion This works fine but the problem is I have another query string that sorts the posts and i dont want to rewrite that one, but something is going on where it isnt being saved
what i want is site.com/forum/posts/general-discussion/?sort=votes
 
off, and on for years
 
but the sort=votes part isnt being saved bc of the url rewrite
RewriteRule ^posts/([A-Za-z0-9_-]+)/?$ posts/index.php?topic=$1 [NC,L]
 
7:56 AM
@eyeLoveFiddle but you never had to validate form input?
 
i have, but it would be easier to process it through a function rather than writing out each verification on its own
it would just be a simple setter function
 
@eyeLoveFiddle no that is not a setter function. A setter sets a property on an object. You need to speak the same language as other developers, otherwise nobody will understand you :)
your function is not setting anything
 
setter - sets the value
 
But it seems, that array_udiff uses sorting.
 
@eyeLoveFiddle sets what value?
 
8:00 AM
pure, and simple
the value you're telling it to run through the function
you're recieving something from A, and want to set it to B
a $post would be harder to do that a $var
 
That doesn't make sense
 
619
A: What is the XY problem?

GnomeWhat is it? The XY problem is asking about your attempted solution rather than your actual problem. That is, you are trying to solve problem X, and you think solution Y would work, but instead of asking about X when you run into trouble, you ask about Y. The Problem This can lead to frustrati...

your problem isn't clear
 
you are trying to validate the form input to make sure that all the required fields are there?
 
when setting a variable you either need to know if it's false, or if it's being set
 
@eyeLoveFiddle are you trying to change only values that are not empty? you need to describe your problem from the start, you are still describing your solution
 
8:05 AM
without saying make sure I'm getting $_POST from client, you're saying if I am getting X,, set it for me
 
@Ja͢ck It seems that array_udiff uses sort.
 
@sectus Hey, I've just added an answer there.
 
what the client is inputting may, or may not be there, if it is, don't bug me, just set it
 
Yeah, the diff functions all sort.
 
I, see :^ )
 
8:07 AM
The answer took some research time :)
 
recieving validation/variable dependency validation is my goal
 
@eyeLoveFiddle something like that? or are you going to throw errors if something is missing? 3v4l.org/pTb2A
 
yes, but it would just set the var
 
set what var?
 
so, array_udiff sorts, but use result of sorting. array_diff_uassoc sorts, but does not use result of sorting.
 
8:13 AM
$pass_value
 
@Ja͢ck, 3v4l.org/s8aVL
 
@sectus E_BAD_COMPARISON_FUNCTION
You can't just return 0 or 1.
The return values ought to cover the range [-1, 0, 1]
 
@Ja͢ck i can for array_diff_uassoc
 
It's still a bad comparison function.
 
with another type you could
 
8:16 AM
> The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
 
@Ja͢ck , both functions has... but...
 
Eh?
 
i should get to bed, but i'm still stuck on how to run it with a simple variable being set
 
morning!
 
@eyeLoveFiddle Honestly, you should work your way through one or two basic php tutorials. Otherwise you will keep getting stuck on such trivial problems...
 
8:21 AM
morning
 
i can do the code, i'm just getting tripped up on passing into a function the checker/setter so i can output the final variable at what I want it to come out as
 
@NikiC You think we should revert this change? :)
 
@Ja͢ck , but array_diff_uassoc does not use result of sorting.
 
so a generic data recieving validator is trivial?
 
8:23 AM
@sectus What do you mean by "not use result"?
 
Good morning
 
@Ja͢ck what's the context here?
 
yo @AlmaDo, nice to see ya around
 
@NikiC Hmm, some context here.
By doing != comparison instead of < on key comparisons it will eradicate any performance gain you would get by sorting.
So basically I'm considering this bug report to be 'not a bug'.
 
@Ja͢ck , yes...
 
8:27 AM
good morning
 
@Ja͢ck the reproduce code looks pretty reasonable ... why is this not a bug?
 
@Ja͢ck Yes, NaB. If he'd put == in the comparison, everything were fine…
 
@NikiC Because the guy wrote a stupid comparison function.
 
@NikiC Because < and > do loose compares and === does a strict comparison…
 
You'd get the same weird result when doing ksort() if the array has mixed keys.
Of course, ksort() offers the SORT_NUMERIC or SORT_STRING option, so the same idea should be applied to custom functions.
 
8:29 AM
@eyeLoveFiddle yes
 
@Ja͢ck Valid comparison function for strict compares would be e.g. 3v4l.org/O0hKS#v500
 
@bwoebi I don't consider that valid, though.
It only returns 0 or 1.
 
3v4l.org/lFQUm#v534 - different iterations count because array_diff_uassoc was 'fixed'
 
@sectus Yeah, array_[u]diff() doesn't look into key values.
 
3v4l.org/gJiu4#v500 @Ja͢ck well… that. Pure string compares always work.
 
8:40 AM
@JoeWatkins I'm here, let's say, 24/7, but jumping around 6-7 topics a day..
How is it going?
 
Good to the morning room 11 humans
 
Shame it's only shipping to North America
 
@bwoebi Yeah, that function gives the same results with or without my patch :)
 
@Ja͢ck , but different count of iterations.
 
8:53 AM
Depends on the input set, but yeah, potentially.
I'll run some more tests later ...
 
But… well.
 
hmm?
 
@Ja͢ck not sure
 
It's a bit weird to have a ternary function when we need to do a binary check…
 
You're right. The bug reporter is right as well :P
how can you do a strict diff (without felipe's commit that is)?
 
8:55 AM
Indeed, which is why I would suggest making it clearer in the documentation.
 
@marcio I ended up voting -1 on the lexer, sorry :(
 
so... i can create the same bug for array_udiff?
 
It just seems too fragile to me
 
@NikiC A strict diff would split the key set into numbers and strings, then inside each set it would compare as usual.
 
@NikiC We cannot. But the array sorting then is too much.
@NikiC mh… I need to review patch again.
 
8:58 AM
Because the key type can only be two things, you can choose to always keep numbers "left" and strings "right".
 
hmm ... someone really dislikes my take on views in mvc
 
@Ja͢ck yeah… you'd need to do something like $a = gettype($a)."|".$a; (same for $b) and then compare.
 
@Ja͢ck right, that's a good approach
 

« first day (1600 days earlier)      last day (3341 days later) »