« first day (1041 days earlier)      last day (3904 days later) » 

12:04 AM
Incoming downvoting spree in 3.. 2... 1...
 
Ant sublime users ?
 
Yup
 
How do I set up a tool for php documenting?
 
You mean like DocBlockr? sublime.wbond.net/packages/DocBlockr
 
great thanks
 
12:28 AM
@igorw it does look like the PHP code is 1) Checking for function in global/current namespace.
2) Assuming that if it isn't in the global namespace there will be a \\ in the function name.
3) Not checking the result of the function call zend_memrchr to see if there is a \\ present and just assuming there is.
i.e. either there should be a check here:
ns_separator = (const char*)zend_memrchr(Z_STRVAL_P(zv), '\\', Z_STRLEN_P(zv)) + 1;
or before zend_do_begin_function_call is called for the presence of a '\\'.
 
Hi guys!
I need help i am developing something where i need to user access token!
and user need to copy access token from url
but some people put full url rather then just copy access token from url
http://g*******.com/callback.php#access_token=314267597.ba75ca7.50754063b971
Now i want to get only this part from url ( 314267597.ba75ca7.50754063b971 )
and I want to remove rest of part
anybody can help me please :D
 
Malik, why use #. If you use http://g*******.com/callback.php?access_token=314267597.ba75ca7.50754063b971 then it's just $_GET['access_token'];
 
@MalikUsman Use php.net/manual/en/function.parse-url.php to parse the url, and then use php.net/manual/en/function.parse-str.php to parse the QueryString.
 
Night all
 
afternoon fabian
 
12:42 AM
well @Fabien its not my application i am getting access token from 3rd party
 
1:22 AM
@malik you may need to use js. I dont think web servers can access #foo=bar in a uri
12
Q: PHP - get value from URL after # sign

ilehttp://domain.com/site/gallery/1#photo45 How to read value after the # sign (photo45)? PS: What is the English word for the # sign?

 
1:35 AM
@igorw You have a pull request that makes your test pass. I have 221 failing tests on my PHP that I just compiled, none seem related to that change. Warning I don't actually understand any of that underlying code, so you really ought to think if it's actually doing the correct thing or not. Also, obviously it may be better to rename that function, as it is kind of misleading now.
 
 
2 hours later…
user652649
3:15 AM
morning
 
3:45 AM
Morning
 
3:57 AM
monring
 
4:31 AM
more-ning
yesterday I started to work with Backbone.js + yii REST api. In that GET and DELETE requests are working fine, but PUT and POST was not working.
Means anything I post on that $_POST is always blank. Now I found the solution for this stackoverflow.com/a/18281601/1679187
Today will complete the POST and PUT part. :)
 
I actually think that stackoverflow.com/questions/18371612/php-pointless-use-keyword is a good question.... but its getting a lot of dv and cv action
 
good question, but with less content.
 
@yogeshSuthar Isn't it basically a noop in this case?
 
@Orangepill just two dv :)
 
@Jack but 4 cv
 
4:42 AM
it's closed actually.
@Orangepill Btw, it does have some purpose :)
 
What does it do in that case?
 
When you have use FooInterface; you don't have to explicitly say \FooInterface.
It saves one character =D major saving.
 
Gotcha ... so a use statement is interpreted from the root namespace
 
Makes sense then I thought you would have to do use \FooInterface as FooInterface to do that... I really need to start using namespaces
@Jack now that I look at the other use calls it's apparent... the other ones don't start with a \
 
4:50 AM
You could do that too :)
Actually use Foo; and use \Foo; are the same thing.
 
I had always assumed the use statement was interpreted from the namespace in which it was called. Like I thought the behavior would have been different had it occured before the namespace declaration.
 
> Note that for namespaced names (fully qualified namespace names containing namespace separator, such as Foo\Bar as opposed to global names that do not, such as FooBar), the leading backslash is unnecessary and not recommended, as import names must be fully qualified, and are not processed relative to the current namespace.
Emphasis mine.
 
My current namespacing style is ZF1 style.... so I end up with loooooong class names with lots of underscores.
 
Yeah, I've made the switch about a year ago :)
 
@jack that's about when I first started saying I should :)
 
4:57 AM
1
A: warapping script tag in function in jquery

Sudhiryou should be doing something like: //load all the scripts <script type="text/javascript" src="gallery/js/jquery.js"></script> <script type="text/javascript" src="gallery/js/swfobject.js"></script> <script type="text/javascript" src="gallery/js/flashgallery.js"></script> <script type="text/jav...

30k+ rep and still answers like that.
> Don't "what you wrote", do like "what I wrote"
 
Hey ... that would be me if I didn't give in to peer pressure :)
 
lol
I only catch myself doing this in FGITW scenarios =D
But in the end my answer would be canonical.
 
I've done that... write the right answer ... then go back and write a good answer.
Sometimes it's hard to believe that english is my native tounge
 
The trick is to get the full answer before the 5 minutes cut off ;-)
Hmm, I would assume people in Minnesota know English quite well heh
 
At one point of time I was really proud of myself for getting on the top here ... But then I noticed ircmaxell was in the number 3 spot and he only answered 18 questions to my 260+
@Jack I'm actually from Mississippi...followed a skirt to Minnesota
 
5:08 AM
Ah, the state that traffic police makes you spell when you're pulled over eh?
 
yep :)
 
Ooh, the question got reopened :)
I've had my Notepad open with the answer lol
 
@Jack you a windows guy for desktop?
 
It's my office PC. I have a Mac at home.
 
@Jack I took you for a roll your own everything slackware guy :)
 
5:18 AM
Ah, I have a Gentoo box at home too =D
I wish SO would give me a one-day pass to delete as many of my answers as I can for the purpose of spring cleaning =P
I have so many zero score answers that I want to get rid of :(
 
dups of other's answers I take it... I can't imagine you writing incomplete or incorrect ones :)
 
Not really, in many cases the OP didn't take any action.
It gets worse when this happens on a bounty, pisses me off.
The bounty gets halved and sometimes not even awarded.
 
5:37 AM
You have to get like a score of 3 before it's automatically awarded right?
 
2+
 
and you only get half in that case
 
Yeah. Also, your answer must come after the bounty starts.
 
Now that is BS
 
So if your answer is already there and a bounty is started, it won't get awarded automatically, even if the score = 2+
So say the rules :)
 
5:40 AM
In the event of automatic reward the best answer should get it regardless of time.
 
Feel free to bring it up on MSO =D
 
5:55 AM
Sometimes I wish to strangle the filter functions.
 
6:18 AM
Morning
 
morning @Leri
morning all
@igorw you use mac right ?? which version do you use and which is the version that is used by most people at the moment ??
I found a bug in pthreads yesterday, a bug that should be devastating and cause a lot to fail ... but it doesn't ...
 
He has posted copy of my answer.
 
@JoeWatkins I am going to play with pthreads this weekend. What bugs should I be aware?
 
this bug has never been reported and I intend to patch it today or tomorrow ... there are no major bugs you should be aware of, tho taking a look at github issues that are still open might show a thing or two ... not really bugs so much as unexpected failure ...
it is not like using a new db driver ...
I wish I could write a bit better, I'd love to write an ebook, at the end of this year I'll have the time to do it, but I suck at writing for humans and I don't think anyone else knows enough yet to do a good job ...
 
@YogeshSuthar I want to dv both answers. I simply hate when array length calculation is in for loop and I also hate when people use for instead of foreach.
@JoeWatkins That would be nice. By the way, is it planned to move pthreads extension in core when it will be stable?
 
6:32 AM
@Leri It's your opinion for using foreach, but using count with for is also not a wrong answer. :)
 
@Leri not likely, pthreads cannot gain anything by being integrated into core, all of the API's it uses it can use from an extension no problem ... additionally, I think we'd all like for php to remain simple and for multi threading to remain an advanced activity that you undertake when you have rock solid php fu in every other area and a good understanding of how php actually works ...
 
@JoeWatkins The key reason I want it to be merged is that shared hostings won't install pthreads, because you can do weird things to cpu with it... But I completely agree with what you said.
 
shared hosts do not normally have a thread safe interpreter, windows might have, I dunno ... we are pushing the envelope, while pthreads only uses bundled functionality, it's the only extension on the face of the earth to use such functionality (not really sure why it ever existed) ... I couldn't really say it is a good idea to run pthreads in a shared environment - for the good of your own ideas you do not want that ...
the idea of pthreads is to stretch php over every resource that the cpu has access too ...
the idea of shared hosting is to share ever resource between (too many) users ...
the two ideas are very incompatible ...
rock solid is setting the bar a bit high, anyone could fire off a thread, but in all honesty they most likely shouldn't ...
doing simple things requires simple knowledge, firing off a thread to do something async is simple, but setting out to write a multithreaded application or framework, not so simple ... some of the answers I have to give to bug reports involve knowing or understanding what I explain of internals ...
 
Good morning.
 
osx is infruriating, all I want is to ruddy compile php on osx and it's taking me forever to get a vm running with xcode installed ...
does anyone know anything about this at all ??
the interweb is full of lies regarding this (and every other) subject
 
6:41 AM
@YogeshSuthar Ok, let me explain little bit. When I use for I do because I need some math on indexes or want some custom range. When you have function in condition of for loop you can never be sure that return value will always be the same on every iteration.
 
jesus "An error has occured during virtual machine execution!" ... I wasn't even doing anything I was reading @Leri's message !!
 
@Leri for loop is good if we have indexed array, and foreach is good for index as well as associative array. It's programmer's choice which loop he wants to use.
 
hello people
i have slight problem in multiple image upload
its not being uploaded in my folder
	public function upload(){
        $config['upload_path'] = "./images/";
        $config['allowed_types'] = 'jpg|jpeg|gif|png';
        $this->load->library('upload', $config);

        $field_name = 'img';


        $this->upload->do_multi_upload($field_name);
       $file_data = $this->upload->get_multi_upload_data();
}
 
do_multi_upload()?
 
yes its one of the function of codeigniter
 
6:46 AM
@JoeWatkins I see why it's a bad idea to have multithreading in shared host. To be sincere I won't use pthreads and when I'll need multi-threading I'll go with .NET (if on windows) or C++ (if for linux, but I really doubt this will happen). I am just more comfortable with php.
Well, there exists some port (under the name of phalanger, afaik), but it has pretty limited access to clr (at least, it had when I was looking at it).
 
@YogeshSuthar He changed $i to $a ;-)
 
one day, a thread safe interpreter won't come with the overhead it does now, I already have a patch for it, but it's not ready for consumption ... at that point, there is no reason that a shared environment cannot run it, and there is no reason that a normal install wouldn't be thread safe in some environments ...
 
@YogeshSuthar That also depends what you call indexed array. Some developers arrays with just numeric keys also call indexed arrays and for with that is pain in a**.
 
even now it's the lesser of two evils, if you are hosting sites that use a lot of forking, or curl_multi recursive requests or any of the other horrible hacks, then you'd probably be better to allow pthreads to run, but for most hosts I'm not so sure
 
@Jack Yeah, and even he gets upvote for this formatting. :(
 
6:50 AM
0
A: remove repeated item in an array

JackYou can use SORT_REGULAR as the second argument to array_unique(): array_unique($data, SORT_REGULAR); Output: Array ( [0] => Array ( [ref] => CALGB10603 ) [4] => Array ( [ref] => CAUY922A2109 ) )

That's the simplest answer though ;-)
 
@Jack It's already answered, why did you posted your own answer. :)
 
Oh, I didn't even realize ... oops!
 
@JoeWatkins Waiting for that day to come. :) Also one more question about internal stuff. Don't you plan to revise getter/setter syntax once more in near future?
 
Ah feck it, I can't delete my answer.
 
if you're talking about the C# getter/setter patch that was voted on a while back ... I voted no ... it if comes up again I'll look at the idea on its own merit, if the same patch returns I'll vote no again ...
 
6:54 AM
wait some time @Jack
 
@YogeshSuthar What do you mean? :)
 
@JoeWatkins May I know what was the reason of voting no? At API level I like it very much.
 
@Jack may be SO not deleting answer for some time.
 
@YogeshSuthar No, I ran out of delete votes.
 
6:59 AM
the patch was intrusive, had a wide impact across many parts of php, including opcode caching ... it was needlessly complex ... shooting ants with bazookas ...
 
I see. So if patch is optimized/rewritten it may see daylight. That's a good news. I am really tired of writing getters/setters when I need some encapsulation.
I hope some folks will take care of it.
 
opcodes aren't free you know ... sure you'd like a more intuitive way to define setters/getters but surely not at such cost, it could cost you a stable opcode cache for a couple of minor releases, it could cost you overhead on every single request over and above what it costs just to define your own logic in php ...
when we look to add stuff like that it should be simple, and it should provide an actual tangible benefit on every execution, not cost every execution and complicate further things that are already complex (opcode caches for example) ...
 
morning, guys
 
@AlmaDoMundo moin
 
7:07 AM
At opcode level it could be simple function call (e.g. get_propertyName speaking of C#), imho.
I am not really familiar with compiler internals.
 
you don't have to be, that's the beauty of it...
it's shit that everyone got excited about running the patch ... but there is a reason the people voting voted no, we were doing you a favour :)
 
$subscriptions = array_filter((array)filter_input(INPUT_POST, 'subscribe', FILTER_VALIDATE_INT, FILTER_FORCE_ARRAY));
Why PHP, why?
 
pretty high vote turnout and failed to get a majority iirc ... thats a good sign that it's probably not the best idea ...
 
Morning room
 
moin @PeeHaa
 
7:11 AM
hi, @PeeHaa
 
Goedemorgen mijnheer Hordijk :)
 
I guess, I'll move to haxe and then optimize generated code if needed.
 
:-D
 
What is the difference in PHPMailer between the following: AddAddress vs AddReplyTo ?
 
7:13 AM
I'm guessing one goes into To: and the other in Reply-To:?
 
^ that
 
@Leri
Looks like something went wrong!

We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.
Thanks @Jack
 
morning
 
7:18 AM
hi
 
I really l like working with php mailer :)
 
@Duikboot Hmm, something's wring with github
 
I like Swift better, though I'm not sure if it integrates with Amazon SES.
 
@AlmaDoMundo Ha thanks to PeeHaa and Fabien I got nginx working :D
 
Dangit @HamZa hard at work again today i see
 
7:21 AM
The github octopus is falling, falling, falling.
 
@DamienOvereem meh, I finished my internship this monday :)
 
@HamZa great, and? :p
 
failed ?
;p
 
Never used the email service of Amazon. ( Never used any product of amazon ) so I don't know :)
 
@AlmaDoMundo and ? I spend DAAAYS setting it up lol
@DamienOvereem lol no. They were happy :)
 
7:22 AM
@Duikboot Actually, somebody wrote a transport for it ... unfortunately, it's on Github :)
 
@HamZa Congrats. How does it feel?
 
.... suddenly feels the urge to kill Jimbo .. "jQuery IS magical" wtf :)
 
@HamZa strange. mostly, nginx is simple to setup and config
 
@Leri great since I've now holidays. Unfortunately it's only ~2weeks ...
 
@DamienOvereem But ... jQuery is magical :)
 
7:23 AM
@AlmaDoMundo meh, not in my case lol
 
... abra-f*king-dabra ...
 
only reason it exists is because plugin developers made some fancy stuff with it .. but gawd that thing is a mess
 
i much prefer mootools.. redesigned from the ground up to actually be decent ..
 
7:25 AM
@Leri Of course, I gotta work on my parttime job :P
 
@DamienOvereem For the fun of it, I opened jquery.js in Storm and it showed a shitload of warnings ;-)
 
@Jack lolz
 
@HamZa Cool. :p
 
The most magical for me is still rewrite rules I think ... damn fecking voodoo!
 
@HamZa ... damnit .. I watch porn all day and it shows up in the firewall logs at work.. and thats cool.. porn is cool... But now I'll be marked for life for opening a page about pokemon ><
 
7:26 AM
@DamienOvereem ahahahaha
 
Does anyone ever read the firewall logs? :)
 
Hope not :)
anyways.. im afk'ish .. time to finish my fancy hosting status notifier bar thingie for our new management console ....
IN BLOODY JQUERY ...
 
Good luck
 
Is it hard to change the color of the php generated error messages?
 
You want to make them invisible? :)
 
7:29 AM
lol
@Duikboot !important all the errors styles lol
 
No I want to make them white.
 
.. * { color: white; }
 
@Duikboot I would recommend choosing a happier background colour for your pages :)
Black is so ... dark.
 
just give it a white text shadow that way its readable on black or white ;)
 
Nothing is wrong with black.
 
7:30 AM
0
Q: Convert integer numeric interval to regex

Alma Do MundoSO, I'm looking for a solution about the problem - how to convert integer interval to regex. Suppose I have two numbers, A and B. Both of them are positive integers and let be A < B Now, I'm looking for algorithm (may be code) that will result in a single regex, that will match numbers between ...

who knows? :p
 
In wich file do I have to add styling?
 
@AlmaDoMundo If you want "code", then add a tag ... For example PHP ...
 
mornings
 
@DaveRandom morning :)
 
7:31 AM
@AlmaDoMundo Regex isn't very good at making comparisons.
 
@Jack yes
i can compare $A<=$x && $B>=$x
@DaveRandom hi
@HamZa which tag? it can be any language
 
@AlmaDoMundo The easiest way is:
$regex = '#'. implode('|'. range(25,35)) .'#';
 
.. youtube.com/watch?v=N1Hs2AQwDgA wow best song in the world :)
 
@HamZa look at the question
 
Argh @AlmaDoMundo.. don't EverEverEverEver use regexp for numeric ranges.. everytime you do you kill a kitten ..
 
7:34 AM
@HamZa '.. In common case, when A is something like 83724 and B is something like 28543485 it's not so obvious, however. ..'
for this - range is a weird solution
 
@AlmaDoMundo I know, it's inefficient ...
 
@DamienOvereem :p it's a curiosity matter :p
 
which will fail miserable.. unless you make a rediculous number of groups
 
user652649
morning
 
@DamienOvereem like this :-)
 
7:35 AM
100-200 ... [1-2][0-9[0-9] ... 100 to 299 .. crap.. 99 too many
 
@almadomundo @hamza can make regex do magic
 
and it gets seriously more rediculous when the number grows in length
 
@PeeHaa No that's fine, but localhost.domain isn't (it has a special meaning in public DNS). The main stipulation is that you should use a TLD that ICANN doesn't recognise if you are just making shit up, usually I create foo.com.dev and bar.com.dev, which has the added advantage that - when you are using a local DNS server that allows you to do so - you can create a *.dev wildcard A record and point it at your dev server, and you never have to touch your hosts file.
 
regex is for strings.. not numbers
 
100-200? it's simply [1-2][0-9][0-9]
 
7:37 AM
@AlmaDoMundo Simple math. Subtract A and B and then calculate logarithm with base 10 cast it to int and add 1 that will give how many digits from the right varies.
 
@HamZa my point exactly :) +1'ed
 
@AlmaDoMundo meh, in a real world application you would do #\d+# and use a callback :P
 
@AlmaDoMundo that expression matches 100 - 299
 
@DamienOvereem yep. ^1[0-9][0-9]|200$
 
7:38 AM
k.. and now keep going for 1 to 100000000
enjoy :) i'll get back to work now
 
@HamZa in a real application I do two comparisons
 
@AlmaDoMundo What's the input set?
 
@AlmaDoMundo @HamZa pretty much nailed it in an answer to another question. I suggest you read: stackoverflow.com/questions/16974342/…
 
@Jack- any integers. well, let them be 1<A<1E9
 
7:41 AM
/^(\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])(?::([1-9]|\d{2,4}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/
^^ for matching IPv4 addresses with an optional port
 
@DaveRandom - interesting - thanks
 
Instead of copying an answer almost verbatim, you should mark this question as a duplicate. — Jack 46 secs ago
Starting to see this behaviour more often recently.
 
Repeat offenders?
 
@Jack YEAH, I think I'm going back to downvote ALL ZE THINGS !
 
Lol
@DaveRandom Not sure, my memory doesn't work that way :)
 
7:44 AM
> I'm creating a football league system but i have a several dudes.
 
lol
@DaveRandom Is that the new spam system that's attacking Stack Exchange ?
 
morning
 
Not spam, I'm not able to work out whether it's burnable at the moment, the guy's English isn't great but we shouldn't penalise people for that alone. Ref: stackoverflow.com/questions/18374361/…
 
Morning
 
@Fabien - hi
 
7:49 AM
Hi
 
Does phpmailer works with a sort of caching? I had an image in my html with a local path and now I used an online image.. but every test-run I do I see the previous old path...
 
Something tells me @tereško closes alot of questions with the reason: "requires a minimal understanding.."
 
Hello, I've got some issue with my website session, which happen accidentaly and it's should never happen, I have customer in same office login to my website, accidentally they got others data which is in the same office, and my customer which account swapped try to login with his account and got the first customer data, I really confused with it, cause I check the log they load their own data, is it all about network failure or on my session ?
 
7:58 AM
@SabilValdano lolwut
 
....
@SabilValdano I'm guessing you posted this as a question already, but it got closed because "too broad" ?
 
@DamienOvereem humm actually I just posted something about it here, maybe the others?
 

« first day (1041 days earlier)      last day (3904 days later) »