« first day (836 days earlier)      last day (4103 days later) » 

10:00 AM
OK well I personally would probably start by extending SoapServer and overloading the handle() method to grab the XML response as a string
Something like this:
 
/me already feels this is hacky
 
class MySoapServer extends \SoapServer {

  public function handle($request) {
    ob_start();
    parent::handle($request);
    $response = ob_get_clean();
  }

}
@MarkH Agreed, and you can keep trying to get them to sort it out at their end if you like, but if you wan't to go down that route theres not much more you say to them apart from "read the f*cking spec"
 
if i sent you my phps code
could / would you mind implementing it for it?
or least shovingme down the right path ? : )
 
@MarkH I can certainly take a look at it, although probably this afternoon as I am going to have to get on with some real work very soon ;-) Just if you want to prove they are wrong in a sentence: w3.org/TR/2007/REC-soap12-part1-20070427/#notation
> This specification uses a number of namespace prefixes throughout; they are listed in Table 1. Note that the choice of any namespace prefix is arbitrary and not semantically significant
(second sentence)
 
so send them that link
and: Note that the choice of any namespace prefix is arbitrary and not semantically significant
 
10:08 AM
@DaveRandom Hey, I've seen that statement before ... but with OpenID :) more specifically AX
 
any one know how to upload video on metacafe using that api ??
 
@MarkH I certainly would (although be nice), but I confidently predict you will end up working around the issue for them in the end.
 
heh yea
got this back... just now
Hi Mark,

That’s fair enough, Apoorva has said he can look at the client to include a conditional to accept soap responses containing the namespace notation.
/me needs a gun
 
Yeh that pretty much sums it up. "Include a conditional ..." says "I don't understand how XML works"
@Jack Never done anything with it, don't really know how it works implementationally. Does it work? Sounds complicated, like the sort of thing a lot of people would screw up
 
@DaveRandom thanks for the feedback : )
 
10:13 AM
@MarkH I might take a look at doing something with this later, it's obviously a common problem, I'll try and throw a canonical server-side solution together
 
if you'd like to see the PHPS i can drop that real quick
 
Not sure if you can figure out the gist, but basically, the OP was expecting the namespace alias "ax."
However, SE returns an auto-generated alias, but obviously with the correct URI
 
But yeah, openid is not one of the easiest things to get right :)
 
Hmmm, I considered implementing Persona (Mozilla's OpenID-like thing except with e-mail addresses)
 
10:17 AM
i have to do some stuff with OpenID soon @Jack
 
@naveen hey got disconnected.
 
@MarkH kk I'll take a look in a little bit
 
@DaveRandom ta :-)
 
@MarkH well, better get prepared then ;-)
 
@Jack yeh lol
 
10:19 AM
though, openid is easier to read than soap at least.
 
haha yea
i didnt have documentation for that SOAP work
i had to guess :(
 
@MarkH So basically though, what you need to do is be able to control the ns prefix of the payload isn't it? Or the envelope as well?
 
all @DaveRandom
 
the odd thing is GroupcallUpload has the right namespace prefix
but the response uses ns1:
 
10:21 AM
@naveen put your code in someplace like pastebin and let me know the url
 
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GroupcallUploadResponse xmlns="http://yourserver.co.uk/WebServices" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<GroupcallUploadResult>true</GroupcallUploadResult>
</GroupcallUploadResponse>
</s:Body>
</s:Envelope>
this seems to be how they'd like to see the response
 
@MarkH You mean the data they are sending you?
 
im sending that back to them
 
Sorry, I kinda missed all the stuff about the service schema yesterday
 
but at the moment it has SOAP-ENV and ns1:
you can see the WSDL here;
 
10:24 AM
Ugh, I'd forgotten how unreadable WSDL is
 
they are all using that <s:
i dont get how the SoapIn has the right namespace prefix and SoapOut does not.
 
It has the right namespace, it just uses a different prefix
Prefixes are basically a way of mixing multiple types of document into one
 
i see.
so our only option is that "hack"
 
The real solution is actually for the client side to learn how XML works and/or use a prebuilt SOAP lib, it sounds to me like someone who doesn't understand how XML works has tried to roll their own SOAP client
But for the sake of simplicity I suggest you just hack around it
 
at their end
 
10:28 AM
btw, don't use Java style constructors in PHP, use __construct(), the Java style ones are deprecated and IIRC are not used as constructors in 5.4, could be wrong about that though
 
Anyone had any experience with HTML5 websockets? Found: socketo.me and apparently it's perfect for PHP - was just wondering if anyone had any opinions on the subject?
 
@DaveRandom anything you can help refactor im happy to take on board suggestions
 
@DaveRandom Since 5.3.3, it won't recognize java-style constructors
 
Really? That long ago? Can't believe I've never had problems because of that, I'm sure I've used some pretty old libs since then.
@Jimbo I do have opinions but you won't like them.
 
10:35 AM
@DaveRandom I'm interested anyway, I have yet to do some proper research on it :)
 
@Jack Oh it's only with namespaces. Still, don't do it, it's ugly.
 
Ah yes.
Though, just because of that, it's quite obvious what the language prefers :)
 
@Jimbo Well I am very much of the opinion with anything like this that you should roll your own so you can really learn properly how it works. Then, when you've done that, you can make a properly informed decision about which pre-build libs (if any) are worthwhile. This is particularly true of IO wrappers IMO, but then I would think that because networking is my thing.
 
public function connect($host, $port, $path)
{
  $this->_host = $host;
  $this->_path = $path;

  $key = base64_encode($this->_generateRandomString(16));

  $headers = array(
    'Host' => $host . ':' . $port,
    'Upgrade' => 'websocket',
    'Connection' => 'Upgrade',
    'Cookie' => '_asg_helpdesk=m4st3r',
    'Sec-WebSocket-Key:' => $key,
    'Sec-WebSocket-Version' => '13',
    );

  $headers = $this->makeHeaders($headers);

  $this->_stream = stream_socket_client('tcp://' . $host . ':' . $port, $errno, $errstr, 1);
Roll your own they said, it will be fun, they said :D
@DaveRandom There are many gotchas, I don't think that anyone that is not your level in networking would consider that as an option.
 
@DaveRandom That's a really really good opinion - I had no idea why I would use a PHP framework until I started building the blocks for myself and seeing what they could do and how they could help me
 
10:43 AM
@webarto I'm not suggesting that you use it in production, merely that you implement it yourself so it becomes easy to spot the shite when you're looking at libs to use
 
I'm going to take a look at his code, see how it does, and then create something myself :)
 
@Jimbo I would start with the spec, not someone else's code - if you look at someone else's code you'll be led down that way of thinking.
 
And probably wrong, for that matter...
@DaveRandom For production I don't know if PHP is the right choice anyways... Not sure. I have maximum of 30 simultaneous connections on production so no worries for me.
 
I freaking hate cowboy programmers
 
@DaveRandom Looking at w3.org/TR/2009/WD-websockets-20091222 they actually tell you what to do in your code, step by step.. like Throw a SNYTAX ERROR here
@webarto Is that your own websockets code?
 
10:53 AM
@MarkH You actually don't want to extend SoapServer and export it in the way you have done. By doing that you are exporting the public methods of SoapServer, effectively allowing the client to manipulate the way the service works - not only is the GroupcallUpload method exposed, but so is setClass etc - this obviously poses a potential huge security risk, the client could inject an object that is able to manipulate your local server in ways you don't want it to.
@Jimbo A lot of specs are like that, it's amazing how wrong people can get things despite being spoon fed
 
@DaveRandom ok... so what ive got is useless?
 
@MarkH No useless, no, just exposing more than you want it to. You probably want something that follows the decorator pattern instead, or possibly just a completely separate entity - the GroupcallUpload method doesn't rely on the SoapServer instance, it just a simple routine, I'll take a look at refactoring it for you over lunch
 
@DaveRandom thanks
 
@MarkH It would also probably make more sense if you rename the GroupcallUpload type in the WSDL to GroupcallUploadRequest (because that describes what it is more accurately). If you have a method-specific request/response type pair like that, it makes more semantic sense to suffix both of them with the direction in which they are used, rather than only one of them (IMO)
 
11:03 AM
k
 
Please
 
May I remind people of
3
A: Restrict users under a question ban from chat

PeeHaaI agree with this in the fact that users banned from asking questions on main should also be banned from posting messages in the chat. This would prevent users from knowing who is question banned which seems to be a no-no when looking at Yannis' comment: don't hold your breath on this one, w...

ktnxbye
 
Anonymous
what is a cowboy programmer
 
Good morning
 
@ircmaxell Morning
 
ok, this is convincing
 
11:24 AM
lol
 
Anonymous
@Gordon feel good?
 
11:43 AM
@Gordon Well, you could probably fit it something else too :P
 
Well, just looks like I have another speaking gig. At a conference I didn't even submit a CFP for... Should be interesting. Giving a talk on Development, By The Numbers. Basically metric tools like pdepend and phploc to analyze a codebase
 
> To export all the functions, pass a special constant SOAP_FUNCTIONS_ALL.
Why does that even exist?
Let's export exec() shall we?
How about eval()?
 
@DaveRandom do you really want to know the answer to that?
 
No, I prefer to remain sane.
Having said that, I'm already dealing with SOAP, so that ship may have sailed.
 
11:49 AM
@DaveRandom Hey, did you ever used praseXML()? :)
 
@Gordon hahahahahah that is golden
 
@Smiley In what context?
 
@DaveRandom Well if you ever used it in your code as I get some stranger results with it
 
@Smiley You mean the jQuery function?
 
11:51 AM
@DaveRandom Yep
 
Fiddle?
 
@DaveRandom Ok, you wont see much but the second script is XML one jsfiddle.net
 
@Jimbo Yes (borrowed logic from few of them), but I can't maintain cross browser compatibility so I gave up. pusher.com
 
Hello And Good Evening everyone
 
11:54 AM
@Gordon Not sure about the TL, but it must be a dupe
 
@webarto Damnit - if I want cross-browser 'push' then I'd have to use a third party service? :(
that sucks
 
@DaveRandom I think you may be ok, unless you define eval in the WSDL. Not sure though, will need to dig in
 
@Jimbo No, but I'm not sure you won't have to change something now and then... e.g. stackoverflow.com/a/11714162/424004, so I decided instead of fiddling with someones code, I try to make my own implementation (for private non stressed serer), etc.
 
I am reading date from an excel file and the excel file contains data box like
you can click on "Task bar" and proceed. now when i read this in php and tries to print it it gives an obvious "you can click on Task bar and proceed" removing my middle duble quotes. I wna t to store these quotes in database as well.
 
@Smiley is that like praiseXML()? Where it will tell you how awesome you are for using XML?
 
11:57 AM
@ircmaxell I need to remove some tags from a string,,
 
I was making a joke about the swapped r and a in praseXML...
 
Ohh :)
 
@Jimbo Depends how much compat you want. If you're targeting older browsers or want any IE support at all you will have issues. Don't forget though, that third party service is just using free and open standards to operate, there's no magic going on, you could implement that yourself - although if they are confident enough in their product to charge for it, it should give you an indication of just how much work would go in to that.
 
@DaveRandom IE doesn't deserve compatibility, and it's internal anyway so nobody uses IE ;)
 
@ircmaxell that's an awesome function. But it will return void when invoked by @Nikic
 
12:00 PM
:-P
 
@ircmaxell I wouldn't worry about it, I'm not going anywhere near it, I was just idly flicking through and that set off some alarm bells. If you were to decide you wanted to do something with SOAP (god knows why you would), make it so that it respects __construct() constructors for the registered handler class and add an option to control the namespace prefix for the envelope and the package. I know it shouldn't matter, but that does seem to be a very common problem with it.
 
@DaveRandom I'm going to play around with it, because if it is how it seems, I'm going to suggest immediate deprecation and removal, with other "measures" to prevent abuse
 
@DaveRandom SOAP seems to be haunting you
;p
 
@DaveRandom Ohh no no sorry that is wrong fiddle
 
Anybody there
 
12:05 PM
Nobody
 
Specially not @webarto, he's never here
 
@DaveRandom Yup, I haven't seen that guy in ages..
 
Or that @DaveRandom guy. Man that guy is a douche.
@Smiley Got the right one?
 
How to set radiobutton checked using its groupname in jquery?
 
12:08 PM
@DaveRandom Yeah, good thing he is not coming here anymore, with all his fancy British talk.
 
@DaveRandom This one: jsfiddle.net/8V7st
 
watch it, im British
 
@RenjithPalavilai That is the worst possible questions you could have asked here.
 
@RenjithPalavilai The groupname would refer to the whole group, you can't set the whole group as checked, that defies the whole point of a radio group.
 
@MarkH My condolences.
 
likewise :P
racist :P
 
:P
 
$('input:radio[name="q1"]').filter('[value="October 2, 1869"]').attr('checked', true);
Something like this
 
1869?
 
12:10 PM
@ircmaxell megalolz
> WhiteSpace Strippers saved 0 bytes
The concept is ridiculous, the fact that they created an empty PR is even better
 
it's not empty, it does a bunch of diffs...
 
I am reading date from an excel file and the excel file contains data box like
you can click on "Task bar" and proceed. now when i read this in php and tries to print it it gives an obvious "you can click on Task bar and proceed" removing my middle duble quotes. I wna t to store these quotes in database as well.
 
@ircmaxell ...and very informative they are too.
 
How can i set selected value of a radiobutton group using jquery?
 
Ow wait, it's just stripping auto-indent fails.
What a pointless tool
 
12:14 PM
dafuq
 
@DaveRandom yup...
 
@Smiley OK, and what's that doing for you? Are you getting any errors?
 
PLB
@RenjithPalavilai I think you misunderstand what for are radiobuttons.
 
@DaveRandom Well I just fixed 1 things it did some wierd stuff before, now it doesnt anymore but it still doesnt work properly
 
I have to set a particular radiobutton checked from a radiobutton group in jquery. How is it possible?
 
12:18 PM
@Smiley Well for one thing it's probably in the wrong place, it needs to go inside the getJSON() callback I suspect
 
@RenjithPalavilai By writing some code and reading the docs.
 
@DaveRandom You mean the whole script?
 
@webarto Are you kidding me?
 
@Smiley The XML handling part. You've put it at the end of the file, but it relies on the data variable - that variable only exists inside the callback
 
@RenjithPalavilai I am not.
 
12:22 PM
@RenjithPalavilai That's almost right, the second selector (for filter()) is wrong
 
wow, internals is heating up again...
 
@DaveRandom Well yes so I can just put the whole seconds script you see in fiddle after the getJSON in first script
 
@ircmaxell best go see a doctor then
;P
 
lol
 
12:25 PM
Use tabs, because using 4 spaces instead increases pollution...
 
@ircmaxell lolwut, I missed that one, in what thread was that?
 
> Thus we can see that the energy cost of using spaces instead of tabs adds up to 16,380kWh per day. That's the equivalent of 409 additional cars on the roads.
 
Oh right, I thought you meant someone had said that on internals
 
no
 
That's an extremely dubious assertion regarding that math as well, especially considering they are stripping whitespace from server-side code that never goes anywhere.
 
12:35 PM
They are spending more energy striping whitespace...
 
hehehe
 
@DaveRandom any idea on what time you'll be able to look over that code today?
 
@MarkH On lunch in about half an hour, should be able to throw a bit of time at it then
 
cool
 
12:42 PM
@DaveRandom Nope, still nothing I put a whole script in first script
 
I like how they managed to get a total of 2 PRs merged. One saved 0 bytes, and the other saved 1.
 
@DaveRandom Is there a chrome 'Reviews' plugin? =]
 
@Jack seriously? I am asking for cv and you answer it?
 
1:02 PM
@Gordon teeheehee
Actually, I didn't know it would have that behaviour ... but yeah, it's a TL question :)
 
@LeviMorrison I think you're going to find that your RFC touches way more than you think it does and that it will cause a lot more breakage than you anticipate. Without seeing the patch I can't even consider it.
 
epic
 
amazing .. i think some big bucks can be made in private english education for phishers ;-)
 
1:15 PM
Brilliant! You think they'd have some intelligence - at least enough to realise that nobody falls for this sort of stuff any more...
 
@ScoRpion... thats just mean... who would do such a thing to an innocent lemon. :(
 
@LeviMorrison: looks like you got a fan on that complex-key RFC...
 
@Jimbo Not at the moment, no. Unfortunately the PK in the URL used for the review queue is separate from the question IDs and the makes it quite difficult to do. I have insider info that the API might be expanded to accommodate it, and even if they don't it is theoretically possible, but we'd have to scrape the DOM to marry the data up and have some form of inter-tab communication. It's on my radar but it's not even on the issues lists yet because it's just too far away from possible atm.
 
@DaveRandom No worries, could imagine a circle middle-left of the profile image (like CV-pls is top).. Here's hoping ^^
 
While you are basically correct, PHP is in fact the ugly offspring of a Swan and a Cat, both may be beautiful in their own way, but the combination is just an ugly thing with beaks and claws that stabs you in the back — dualed 11 mins ago
lol
 
@MarkH What version of PHP are you using?
 
yo
one sec..
5.3.3
 
^ help vampire / self duplicator
 
1:37 PM
Measles is on the rise again @DaveRandom
just been on the BBC News :/
im full of cold at the moment so paranoid im gonna catch that crap too
 
@MarkH kk, just checking if I could use [] array notation. You really should upgrade, btw
 
its CentOS mate... wont get into how CentOS manages PHP packages
: )
 
@MarkH Don't you get vaccinated for that at school though? Or does it wear off?
 
i think its good for like 15 yrs?
i dunno, need to check lol
 
@MarkH It's alright, say no more
(although you could just compile it yourself ;-) )
 
1:39 PM
i could
but then the production server guys will melt :P
 
5
A: What should I do to prepare my website for 2038?

Bart FriederichsUse time and date and datetime instead of numeric timestamps. Good thing is that you can test all these things. Just set the clock to 2038 and see what happens. But I think it's useless to bother on how to update your site. Just stop using UNIX timestamps from now on and you'll be fine. Most co...

 
LOL!!?
 
There won't be LAMP in 25 years? gasps
 
it'll be replaced with CRAMP
;-P
 
duck ... and roll!
 
1:40 PM
The thing that really gets me about that is that it's a non-problem that's already solved. Anyone who's still running something with a 32-bit CPU by that point deserves eveything they get
 
C'mon, 33-bit cpu is good enough :)
 
64-bit here, no less for me :P
 
@Jack Confirming there will be no LAMP in 25 years. I'm already porting nginx to run in my unused brainspace.
 
Although someone really should update the SQL standard to use 64-bit, bring the standard into line with the implementations
It's HTML5 all over again
 
1:42 PM
even made the plunge to SSD for my server.
 
@Leigh Who's going to QA your brain though ?
 
@Leigh It doesn't need anything like that kind of space... :-P
You could store unused furniture in there
 
@DaveRandom On the assumption you are a fatty. There is no unused furniture!
 
Good morning!
My special gift to you today: instacode.linology.info
(not created by me)
 
posted on January 29, 2013 by Brandon Savage

Have you ever had this situation before? You have a problem to solve and no idea how to solve it. You want to sit down and do it “the right way”, but “the right way” involves writing tests, designing objects and generally working out something that’s far more complex than you need to get a [...]

 
1:44 PM
even the more reason not to click it ;-)
 
@Leigh Actually I'm a lanky twat. I'm 6'4" and I never eat.
 
So your kid eats more than you?
 
LOL
im 5ft 11"
also fairly skinny but i eat too much LOL
my daughters almost taller then her mother.
 
@rlemon, U replied coz ur name is lemon... lolzllzzz
 
and she's only 12.
 
1:49 PM
@igorw takes forever :/
@DaveRandom Yea I'm 6'3" and not exactly a piggie.
 
@Leigh yea, I think it's borked :-/ so nevermind
 
Thanks for your presentation, spinny arrows!
I broke it

502 Bad Gateway

nginx/1.1.19

With my echo's declaring igor has a funny smell.
 
@Leigh startups these days... they think they're so flash yet they can't even configure a webserver.
 
@igorw funny idea but it takes ages.
 
1:52 PM
@igorw Let alone pick an up-to-date version of one.
Whats worse is, odd numbers indicate nginx's unstable branch. So old and unstable.
 
the spinning arrows are not centered ... bugggg =p
 
re: the o+ discussion. I was under the impression that optimizer+ actually did some opcode level optimisations before caching, that APC does not do. Is this not the case?
 
Q: Best way to send possibly large file at maximum speed with download tracking (i.e. one file at a time)? PHP/Apache
 
@webarto You mean, block multiple concurrent downloads?
 
@DaveRandom That is right, and what method shall I use to send file.
 
2:05 PM
@webarto Well, sessions kind of do this by themselves if you leave the session open, but it's not the most beautiful solution because I presume you want to show an error page if they attempt to set a second download going. What do you mean by "what method"? Out of what possible options? Like, FTP or sth?
 
    @session_write_close();
    $this->response->send_file($path);

    $query = DB::update('downloads')->set(array('stop' => DB::expr('NOW()')))->where('id', '=', $query[0])->execute();
 
@webarto You used the silence operator!
 
Ok, this worked fine, I mean, you can browse the application while downloading, I'll move sessions to table to remove this @ crap.
@Leigh Don't judge! :P
@DaveRandom kohanaframework.org/3.2/guide/api/Response#send_file I'm currently sending file like this, I see there X-Sendfile but I'm afraid I can't track using that?
Downloading is a bit slow this way, that's all...
 
@webarto X-Sendfile is preferred though, because it relieves php off the duty of sending the file.
The only downside is that you can't prevent multiple downloads in the same way.
At best you would get rate limiting.
 
@Jack Yes, I saw that from you once, thanks :) Very nice. But they should download files fast, one per time, and 40 files/10GB per day :P
 
2:15 PM
@webarto I see no reason why that would be particularly slower, having said that I also don't see why that read loop is there, you could replace the whole thing with fpassthru() and it would do pretty much the exact same thing. I can't believe that's really slowing the transfer down though, unless you have a lot of bandwidth.
 
It's a download library for mobile phone services, someone could potentially download all the content (~1TB)...
 
(code I'm refering to is the framework impl of send_file())
@MarkH OK, just throwing a transliteration routine together, should be done soon
 
cool
@DaveRandom :-)
 
user895378
@DaveRandom I do -- because the file send has to run through userland for every block of bytes with a feof and ftell check. That's always going to be much slower than going directly to the OS to push the file down the socket.
 
@rdlowrey Yeh true, but slower than the server bandwidth?
 
2:19 PM
@DaveRandom hetzner.de/en/hosting/produkte_rootserver/ex4 It's downloading ~150kb/s and it's not constant, so I assumed it was because I'm doing it wrong :) I'll see other options like what you've suggested, thanks for the tip!
 
user895378
@DaveRandom I dunno. Maybe not :)
 
user895378
It wouldn't surprise me, though.
 
Good mornin again
 
user895378
'morning
 
@webarto I think the reason it's there is because of the ignore_user_abort() stuff, which is for the tracking thing, but you could accomplish the same thing with a destructor (I think). The whole point is to allow the reading to stop when the user aborts, but also execute some code afterwards to update the tracking data.
 
2:24 PM
@webarto Is it really a big problem if they can actually download 1TB?
 
@Jack No, they can download everything if they want, but if they download everything in a month, then you'll lose money on subscription :) ($100 per month) ... don't worry, they have money.
    readfile($this->file);
  }

  public function __destruct()
  {
    $aborted = connection_aborted();
    $this->session->set('downloading', 0);
    $query = DB::update('downloads')->set(array('stop' => DB::expr('NOW()')))->where('id', '=', $this->_last_insert_id)->execute();
  }
@DaveRandom ^ this was the old code, I was worried that readfile is bad in this case :)
 
you don't have to URL encode a JSON string in the body of a post, right?
 
@AdamLynch you mean after applying json_encode() ?
 
user895378
Why would you URL encode the body of a POST for anything that wasn't key-value parameters?
 
Yes
dealing with an API which requires it
weird I thought
 
user895378
2:34 PM
Anything with Content-Type: application/x-www-form-urlencoded should have its body url encoded.
 
wait @Jack sorry no... what it requires is the entire JSON string (not using json_encode) is urlencoded
 
user895378
If the Content-Type: application/json, then no.
 
so you end up with data=%blah blah blah in the body
found it pretty strange
 
user895378
Is the API accepting several parameters, some of which are JSON and some of which are not?
 
user895378
Because if it only needs to accept JSON entity bodies then the API designer doesn't understand HTTP ...
 
2:38 PM
Nope
I said it to the guy and he said "special characters"
 
user895378
Well, that means it's option C: either he doesn't understand HTTP or the only way he knows how to access the entity body is through a $_POST superglobal.
 
might be the latter
 
user895378
Because the API should accept a Content-Type: application/json and read the contents of the entity body. In php the entity body can be accessed through the php://input stream a.k.a STDIN (but not if the content-type is multipart/form-data [like a normal post] because php has already exhausted the stream to generate the $_POST superglobal in that case).
 
@nikic what's your SN on freenode now?
 
Does this guy ever come here? :
 
user895378
2:43 PM
Never seen him ... but he can't be that smart because he doesn't have a gold badge ;)
 
@LeviMorrison As I already told you, just change the signature of get_current_key to the same as get_current_data. I.e. a void function that get's the key set into a zval***
No need to pass around types, the zval already does that ^^
 
@rdlowrey :-P I am proud of my badge ^_^ .. wait scratch that scratch, I was looking at the wrong profile :-P
 
:-D
 
@ircmaxell nikic_
 
cool
 
user895378
2:45 PM
@Neal lol
 
@Neal Why was that guy being an arse to you last night? Saw on right --->
 
"You're not a 500 rep user anymore" ... I read the backlog and was like.. Neal's taking some shit here!
 
@Jimbo Haha yea. idk. I just let it be. no point in fighting.
 
@GoogleGuy You might be right. I just thought of one reason allowing scalars in the key is attractive: you can copy the key and prevent modification of the original value.
If you return an object you are free to modify it at wil..
I find that acceptable, but others might not.
 
@LeviMorrison I'm not saying it's a bad idea. I'm just saying it breaks a lot of existing assumptions.
 
@GoogleGuy Are you talking about assumptions in core or PHP-land?
 
Yes
 

« first day (836 days earlier)      last day (4103 days later) »