logs archiveIRC Archive / Freenode / #php / 2015 / August / 9 / 1
biberu
with that particular encoding. is it the one the reciever is expecting? who knows
hairyfairy
....
ONCE AGAIN: I'm talking about the STRUCTURE of the URL.
Alphos
biberu the receiver would know
biberu
unfortunately it's not very talkative
hairyfairy
To see if it's VALID as a URL, except it can have any character past the /.
Because this is DONE in real life.
It doesn't matter at all what some RFC says.
biberu
perhaps i'll just encode that å as %e5 instead
Alphos
hairyfairy just check strpos($str,'://')
if it's >= 1 (which means there's at least a 1-byte/char protocol), you're good
granted, you'll be riddled with false positives, but hey, IT WORKS
it will be "something" that will have the "STRUCTURE of an URL"
oh wait, mailto: urls !
hm
just check strpos($str,':')
oh wait, protocol-relative URLs !
AlphaTech
Alphos: Nice nick ;)
Alphos
just check strlen($str). if it's >=1, you're good
AlphaTech : we're going to have some highlighting problem, aren't we ? :p
         

themightyabby
protocol-relative urls?
AlphaTech
I get highlighted on "alpha" and "alphatech"
Alphos
themightyabby yes ?
biberu
but you aren't unique at 3 characters, tabbing will fail!
Alphos
are you kidding ? i'm lazy. anything longer than one or two chars, i give up
biberu
/nick aardvarku
sagerdearia
gah, downgrading back to 5.6.11 versions of php/php-gd, etc. the issue still exists. =/
OnkelTem
Hi all. Folks, what the hell is wrong with this code: https://gist.github.com/OnkelTem/a051afddaf2ac0059586 ?
$options IS an array, and $a is always uninitialized
Dustin|Work
Give the rest of the code defining options and the rest of those variables
Alphos
my money is on scope, for some reason
OnkelTem
Dustin|Work: done. updated
biberu
http://codepad.viper-7.com/6XZkqi
http://codepad.viper-7.com/Rh19uz
Alphos
http://codepad.viper-7.com/yzhbSC works just fine from where i stand
biberu
problem solved! next customer!
Alphos
that one was easy
Dustin|Work
lol
Alphos
OnkelTem although, to answer your question, "what's wrong with this code", i'd have to mention your naming conventions
$a is just not explicative enough
biberu
and it should obviously be filter_array, not array_filter
Alphos
biberu that one is not exactly an easy fix
biberu
^^
         

Alphos
shame though
dagerik
whats the problem here. stacktrace or gtfo
OnkelTem
Alphos: what made you think this was a real code?
maybe, its smartness? Oh, I see
Alphos
OnkelTem we're all just trying to see what the hell is wrong with this code. not much wrong we can see in what you gave, so i cling to what's left
OnkelTem
I will say you what the hell is wrong. ARRAY_FILTER_USE_BOTH - thats what
it just doesn't work on PHP 5.4.x, and since some moron disabled error_reporting on a site I'm debuging, I saw no error message
runinsquares
back with food :]
OnkelTem
thanks all, I always forgot about nice codepad
biberu
runinsquares: and beer i hope
we're running out
runinsquares
biberu, honestly i really wanted beer but i didn't have my ID and couldn't be bothered with the possibility i might get id'd
so no, pepsi :p
Alphos
runinsquares you got an aspirin too ? :/
runinsquares
ibuprofen but even with a good throw i doubt i'd reach the french border
ProNoob
Alphos, why, getting a headache?
Alphos
ProNoob migraine
now with nausea \o/
ProNoob
Horrible.
Alphos
i couldn't agree more -_-"
runinsquares
is there anywhere you can get some pills quickly?
Alphos
runinsquares scoot to the kitchen, grab one, fill a glass with water, follow the rest of the instructions
runinsquares
instructions: don't OD
OnkelTem
gage is better then pills btw
Alphos
not planning to. my last intake is a bit too close, i'll wait a bit
runinsquares
btw alphos do you use f.lux?
Alphos
for soldering ?
runinsquares
no the software
Alphos
nope
runinsquares
try it, it might be better in case eye strain triggers you
Alphos
if they do, i just close them. tonight, it's the ears :D
thank god my highlights are purely visual...
biberu
they are required to ask if you know how to use ibuprofen before selling it to you here, i wonder if anyone ever failed at that
and if they did isn't it just a case of evolution
OnkelTem
runinsquares: seems useful (about f.lux)
no_gravity
Can you sort an array by a user defined function and pass some additional infos to that function?
OnkelTem
runinsquares: can't make it work on KDE though
biberu
no_gravity: www.php.net/usort, www.php.net/manual/en/functions.anonymous.php
no_gravity
biberu: i tried that
biberu: let me make an example...
runinsquares
f.lux seems strange for the first 20 mins then you don't notice it, it's really cool software
biberu, why did you have to mention beer :< i don't drink it often and i really want some now haha
biberu
:>
no_gravity
biberu: http://codepad.viper-7.com/G2bgoB
biberu
no_gravity: http://codepad.viper-7.com/8qG9JS (line 5)
no_gravity
biberu: nice, thanks!
biberu
see example #3 on the page about anonymous functions too
runinsquares
windows are open and someone having a party playing sum 41
blast from the past D:
biberu, do that codepad again in php7 with spaceship and self execution in the function
^^
biberu
my spaceship is on a course for the heart of the couch
o/
Gatomon
(Action) waits for aliens to abduct y'all.
runinsquares
php coding rules: functions using the spaceship operator must contain the word abduct in the function name
waerloga
lol
ProNoob
I'm all for it.
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 next »