« first day (814 days earlier)      last day (4125 days later) » 

11:00 PM
@Lusitanian What's a domain? What's a URL bar? What's this "chrome" thingy? Y U NO MAEK SENSE?
 
@DaveRandom go to sleep
 
Can't find it on Google maps? Where is it? Have you got the postal code?
 
user1125394
doesn't work :(
 
@DaveRandom postal code SW1A 1AA
 
11:04 PM
lol is that Buckingham Palace?
I'm a little concerned that I knew that without Googling it.
 
user1125394
position: ( 13.33, 33.7)
 
Anonymous
I don't know where I read this, but said something about $_SERVER varibles are not reliable or something... PHP is a retard language.. Everything is either bad, or not the best way, or not recommeded, deprecated....when does the madness end?
 
user1125394
(probably be in water)
 
@DaveRandom I'm also concerned about you knowing this :P
@TheCOMPLETEPHPNewbie They probably mean that _SERVER contains to the most part user-submitted data, so you should not trust it ;)
 
@TheCOMPLETEPHPNewbie Indeed they are not, but HTTP_HOST can be relied on to be sane (if it's not, the server has bigger problems than breaking your application)
@cab 70% chance
 
11:08 PM
> Of course functions can be defined after they're called!
Is it only me or doesn't that sentence make any sense?
 
@hakre Why wouldn't it make sense?
 
@hakre Presumably refering to the fact that function definition's position within the script is irrelevant unless they are in a conditional or inner scope
 
if I call a function that is not defined, how can I call it?
 
@hakre Depends on what one means by "defined"
What @DaveRandom just said ^
 
doIt();
function doIt() {
  echo 'hello world';
}
 
11:10 PM
or means by "call" as @DaveRandom just noted.
 
^^ outputs "hello world"
 
@DaveRandom First defined, then called.
Define a function after it is being called ;):
doIt();

function doIt() {

    function doIt() {

        echo 'hello world';
    }
}
 
"Cannot redeclare function in..."
 
I will try posting some , if you see I'm doing it wrong. Feel free to curse me :)
 
@DaveRandom Funnily not at parse-time. Even it is directly inside itself.
 
11:12 PM
@hakre Yeh that is kind of weird
 
@hakre If you count methods as functions, the you do this routinely. Method call happens first and then the class is loaded in the autoloader :P
 
@hakre I guess you could have different definitions of the same function in different call-time blocks though, so just the fact that two functions have the same name is not an instant cause for rejection. But yeh, that above case does look a bit odd. I can sort of see why it happens though.
 
user1125394
@hakre or (function(x){alert(x)})('lol');
 
Yeh, everybody multimultiping @hakre
 
11:16 PM
doIt();

function doIt() {

    doIt();

    function doIt() {

        echo 'hello world';
    }
}
^ the fun starts here ;)
 
user1125394
does it works?*
 
@hakre lol brilliant. segfault?
 
Yes it works giving a stackoverflow.
my xdebug is cutting that off.
 
I wish PHP had a native max recursion depth setting
 
user1125394
infinite loop indeed
 
11:20 PM
@DaveRandom If you have that, you can't push it to the max.
It's like not having endless loops inside a programming language.
 
The problem is though, without xdebug it just segfaults, so you can't do any cleanup. On a production server insta-death of scripts can cause issues
 
user1125394
I wonder what can people discuss in the #html irc
 
It bit me once because it doesn't close active TCP connections, and the server started rejecting my connects when the script auto restarted because it only allows 1 connection per IP
Plus you can end up with files that are left flock()ed with no lock owner
(although the OS catches this pretty quickly)
 
No type-hinting for use() clause in PHP?
 
@hakre How would that make sense? use() inherits existing vars, it doesn't take args
11
A: Why does an infinitely recursive function in PHP cause a segfault?

ircmaxellIf you use XDebug, there is a maximum function nesting depth which is controlled by an ini setting: $foo = function() use (&$foo) { $foo(); }; $foo(); Produces the following error: Fatal error: Maximum function nesting level of '100' reached, aborting! This IMHO is a far better ...

I knew I'd had that debate before
 
11:30 PM
@DaveRandom because it belongs there. if you want to see my real arguments, we need to meet face to face :P
nah, I just was thinking about to add: but I don't really miss it there.
 
@hakre Careful now, I'm a black belt in Origami.
I'll give you a really nasty paper cut if you're not careful.
 
@DaveRandom With hot chili sauce please.
 
@DaveRandom do you run a dojo?
 
I want a "RTFM" option in the closing reasons that accepts a link to a documentation page!
12
 
@ircmaxell: How many tests should I run and how should the distribution be?
 
11:39 PM
@Lusitanian Nope, I'm all out of amusing dojo-centric puns
 
is a ratio of double(0.95490196078431) good?
ratio with only 100 times looks still good: double(1.1777777777778)
but now I got one fail with 100 times: double(0.5625)
double(0.75) - is that bad?
or is it just that 100 times is much too low for that test @ircmaxell?
Okay, now seeing you're testin with 10000, so if I go higher in the numbers I come much closer to one so I'd say this is all fine and dandy.
 
0
Q: in php decode to encode using md5 funcation

rakeshin php decode to encode using md5 funcation

Somebody actually upvoted that.
 
hahaha
 
@hakre It's in Polish.
 
11:51 PM
sommerhut.
 
0
Q: require_once on a while

user1949821I have this code: while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){ if($i++%2==0){ $color="#FFFFFF"; }else{ $color="#CCCCCC"; } ?> <tr bgcolor='<?php echo $color; ?>' onmouseover="this.style.background='#ABFB04';" onmouseout="this.style.backg...

 
@hakre Why not just use $_GET['got'] directly instead of wasting your time doing $go = $_GET['go'] in the first place?
 
:)
 
@hakre ?
 
@ircmaxell Tests reveal that it is not biased. Also @NikiC :)
@GoogleGuy Yes you can. But that one was long long long (if you mean the $_SESSION question).
 
11:55 PM
@hakre Ah, no, never mind me. I thought stackoverflow.com/questions/14206088/… was your question. I just realized I misread. You just edited it :)
 
@Mechanicalsnail It's years back I last spoke some words Polska.
 
@hakre What does a sommerhut have to do with it?
 
night, all.
 
night @Alexander
 
@Mechanicalsnail Its one of the words sounding like what I remember being a Polish word. So probably way too far off.
@Alexander Good night.
 
11:59 PM
@hakre But it's German.
 

« first day (814 days earlier)      last day (4125 days later) »