« first day (733 days earlier)      last day (4226 days later) » 

4:01 PM
I know what it does. The controller displays the form, getting it FROM the view etc etc, This was NOT the question! — user1121487 5 mins ago
 
If I have <input name="something[key]">, how can I pass this using javascript so that my ajax handler can parse it like a regular form submission?
 
Yes the controller displays the form... that it got from the view... totally
 
I'm not understanding parent/child relationships in objects. If I have a class "DB" that creates a connection to my database with PDO in the __construct() function, and then I have another class that extends "DB", how would I use the PDO prepare() function from the parent class?
I have parent::__construct(); in the __construct() of the child class.
 
@jdstankosky why do you want to extend PDO ?
 
I don't want to have to add the PDO connection code to all my classes that might need to use the DB
I just want to extend a single class that connects to it.
is this doable?
 
4:07 PM
your code is breaking SRP
 
How am I breaking SRP?
 
2 mins ago, by jdstankosky
I just want to extend a single class that connects to it.
 
Having a single class that handles the connection breaks single responsibility, how?
 
parse_str is your friend, I just discovered
 
there is already such a class: PDO
 
4:10 PM
I'm trying to learn proper oop. I am a recovering God Object creator.
 
by extending it you are slapping on additional responsibilities
 
@Stephane No, no it is not
 
@jdstankosky , read the post and watch the two lectures that are linked at the bottom of it
 
@Leigh well it is until I find an alternative.. But how is it not? parsing the input is fine if I control what gets sent
internal application
 
@Stephane It's one of those functions you should never use, because it potentially opens up gaping security holes in your application
 
4:14 PM
@Leigh I can see that. I'm trying to pass a dynamic form using ajax. I can't tell what fields there are until I send the form. So, I have data = $(form).serialize(); and parse_str($passed_in, $parsed_out);
@Leigh what would you do instead?
 
@Stephane construct a query string and post it?
 
serialize does that, but is problematic for multidimensional arrays, it seems. What can I do on the server side?
 
@all Hi guys.
 
@Stephane Not sure serialise actually does that. If you construct the query string properly you'll just access it via $_POST as normal
 
4:18 PM
@Leigh I guess I don't know how to parse it on the javascript side. I can find the elements, but I don't know how to create the extra dimensions. How do I handle name="something[key]"?
 
Possibly your problem, <input name="something[key]"> should be <input name="something[]"> Don't specify the "key"
 
No, I have the key
it's an id
and that's a simplistic example
I also have something[id][another_id]
so I need something that can go more than one level
 
then create a custom implementation which submits data in JSON format
 
Well from 2 minutes googling, it seems serialise handles multidimensional arrays just fine
 
It's sad to see that the SO php chat degraded from a welcoming place into an IRC-like bashing/insulting fest without moderation or decency
 
4:21 PM
@NikiC Was he even in here?
 
@Leigh No idea. Is this about some particular incident?
 
IRC channels are a bash/insult fest? nes to me.
news*
 
> last message 12d ago
http://chat.stackoverflow.com/users/285578/edorian
 
@NikiC Probably re: the pet picture spamming people
 
@Leigh that's what I thought. So I just need something on the other side to parse it out, but I don't know what the alternative is.
 
4:23 PM
@Stephane $_POST ?...
 
@Leigh Not sure, but people posting their pet pictures isn't what I'd usually call "insulting"
 
@Stephane If you're constructing a query string, and posting it, it will be auto-parsed into the _POST superglobal
 
@Leigh it's passed in key/value pairs. I can probably add it to the get portion
 
Nobody thinks huskies are insulting, do they?
 
@Leigh I don't think having it in post will work. I'll have to parse it.
 
4:24 PM
@NikiC now calling someone husky, that's a different story.
 
@NikiC I do, unless they're contributing to 5.5
 
@Leigh it's just a string
 
@Stephane "ok", I dont think you do, so I'll leave it at that.
 
@Leigh I'm not arguing with you, I'm sharing where I am so I can get help. If I have a post variable called data that has $(form).serialize, isn't it just a string? $_POST['data'] will be a string. I'm print_r ing it right now. If you know differently, I would love to know what I'm doing that isn't working.
 
1
A: Jquery Post multidimensional array via $.Ajax

Tatu UlmanenHave you tried serialize()? $.ajax({ url: "/add/", type: "POST", data: $('#myForm').serialize(), success: function(msg){ alert(msg); } }); I'm not 100% sure it works on multidimensional arrays but it's worth a shot.

 
4:27 PM
@Leigh If you use Content-Type: application/x-www-form-urlencoded
 
@DaveRandom isn't that kind of automatic when posting with jqueery?
 
@Leigh that's what I'm doing already, but on the server side, it's a string. That's how I got to parse_str
Something has to parse out the string. Is there an alternative function?
 
@Stephane well see Daves comment then, maybe it's a missing header
 
@Leigh Only if you pass a map as the data. if you pass a string you have to specify the type. I think. I don't know, I never use jQuery \o/
 
I never use it either :D I just regurgitate from search engines
 
4:29 PM
@DaveRandom I don't care if I use jQuery or not.
@DaveRandom just trying to solve the problem
 
@Stephane Well try adding a Content-Type: application/x-www-form-urlencoded in the XHR then, I reckon that's your problem if it's not current working.
 
@DaveRandom thanks!
 
46
A: Jquery - How to make $.post() use contentType=application/json?

Adrien$.ajax({ url:url, type:"POST", data:data, contentType:"application/json; charset=utf-8", dataType:"json", success: function(){ ... } }) See : jQuery.ajax()

 
@Leigh thanks, I saw that too. It says that it uses application/x-www-form-urlencoded by default
 
like dave said, maybe it does for a map but not a string
 
4:32 PM
@Stephane So what does var_dump($_POST) show?
 
anyway, home time
 
In fact, can you make a paste of you code and link to it?
@Leigh Enjoy, laterz
 
@DaveRandom [data] => item_name%5B5%5D=&item_value%5B5%5D%5B9%5D=&item_value%5B5%5D%5B11%5D=&item_name‌​%5B11%5D=&item_value%5B11%5D%5B9%5D=&item_value%5B11%5D%5B11%5D=&item_name%5B12%5‌​D=
etc
 
@Stephane Are you using .post() or .ajax() or something else?
 
load
but I can change that
 
4:36 PM
`echo 'Hello, ' . $row['name'] . ', how are you?';`
How to make it print a default value `'stranger'` in case `$row['name']` is NULL?
 
@ŠimeVidas can't you just put an if statement before that?
 
In JavaScript I do this: 'Hello, ' + ( row.name || 'stranger' ) + ', how are you?'
@Stephane I'd prefer to have it in-line... for now, I use a ternary operator
$row['name'] ? $row['name'] : 'stranger'
 
Ah, why? Does it matter?
You can do that, but not within an echo statement as far as I know
 
@Stephane I'm curious. JavaScript has ||....
 
@Stephane OK well there's you problem. You're serializing to a string, but you're passing it in a map. You either need to manually serialise the form so you can add custom args, or the easier (NB easier not necessarily better) way would be to append your other two parameters to the query string.
 
4:39 PM
@DaveRandom so if I add them to the url and just pass data alone it will work? instead of data:data just data?
@DaveRandom that makes sense. I'll give it a shot
 
@Stephane Yes, but then you wont be able to pass task and id
 
So, are factory classes always a good idea?
 
@DaveRandom but i can in the url
@DaveRandom ajax/school_report.php?task='+task'&id='+id, data
 
@Stephane Yes, you can pass them as $_GET arguments and that will work. I was going to come on to that, that would probably be the best way to do it.
 
@DaveRandom thanks!
 
4:42 PM
@Stephane Don't forget to encodeURIComponent() though
 
@DaveRandom oh, right, thanks
 
Evening
 
evening
 
@ŠimeVidas Since 5.3 you can do $row['name'] ?: 'stranger' and it works the same as val || otherval in JS. However, don't use ternary for anything, it destroys readability and it doesn't gain you anything.
Evening
 
any idea how I can return an array as a nodeset for a PHP function registered with the XSTL processor?
The processor passes an array into the function, however PHP fails to return an array, want's to convert it as string.
 
4:45 PM
@hakre Sorry, registered with what?
 
@DaveRandom This isn't working: $('#school_report_container').load('ajax/school_report.php?'+encodeURIComponent('‌​task='+task+'&id='+id), data);
data isn't coming through
 
$proc = new XSLTProcessor();
$proc->registerPHPFunctions();
<xsl:apply-templates select="php:function('nodeset_func', /*/section/name)" ...
 
@DaveRandom moved the encode to each value, that was a mistake. still no data
@DaveRandom never mind
thanks!
 
@Stephane So what do you get?
lol
 
@DaveRandom but it is getting passed as get which I don't understand
 
4:50 PM
@Stephane .load() apparently uses GET, which makes sense really. You didn't tell it to use POST anywhere.
(only just went and read the docs)
 
@DaveRandom when I passed it like {task: task, id: id, data: data} it was using post. Weird. Thanks!
 
Do you guys see starred messages?
 
@Stephane No worries. I have to say though that for any task you would be doing with .load(), POST doesn't really make sense as a method to use. POST should only really be used for a request that may change the state of the server, and fetching an HTML response should not do this.
Google "idempotence"
and don't miss the "de" out of it :-P
@PeeHaa I see some, why?
 
@DaveRandom it's sending data, updating tables and reloading the div with new content. Basically, this form has buttons to add and remove cells and rows and I send the data to save it before modifying the page.
 
4:54 PM
@DaveRandom I'm switching to $.post so I can make sure I don't exceed get size (I think that's still a thing)
 
hhhhmmm back after reload...
 
@Stephane OK well consider using the PRG pattern
 
are we posting our pets now?
 
Yeh that was a really random journey into the heart of offtopicville
 
@DaveRandom Nice. PHP's A ?: B is JavaScript's A || B.
 
4:56 PM
@ircmaxell was not impressed
 
@DaveRandom I appreciate that but I don't want to reload the page. The state of the form is available on refresh too, but a refresh of everything is a waste of time/resources/jarring to the user
 
room topic changed to PHP: Discussion for all things PHP - Don't ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will. [php]
 
Let me scare you with my uber"dog"
 
@NikiC lol what did it get changed to, wasn't paying attention
 
2 hours ago, by NikiC
room topic changed to PHP: Discussion for all things apart from PHP - Don't ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will. [php]
 
4:57 PM
@Stephane No I mean for your ajax request
 
it should be :
 
why is there no chatroom for FQL?
lol
 
@Kishor What's FQL?
 
@Kishor Because none of us are that tired of life (yet)
 
@DaveRandom what advantage would that give me? The wiki you sent me talks about bookmarks and duplicate form submissions. What am I missing?
 
4:59 PM
> Discussion for all things apart from PHP - Don't ask anything before you made sure that someone will answer your question. [php]
 
@NikiC Bad news for us if it starts getting discussed in here. Let's leave it at that.
 
@NikiC - Facebook Query Language?
 
@DaveRandom Too late :P
@Kishor Is that like SELECT COUNT(friends) => 0 => :( ?
 
Its pretty much SQL :)
 
where do fook does android store it photos... :(
 
5:01 PM
Bit confusing for me at times because I am a newbie coder
 
@Stephane It's simply about best practices. Forget about your UI for a minute and break it down to HTTP: if a given request is not idempotent (i.e. 2 or more identical requests will have a different effect than a single request) it should be a POST request. If the client wants to retrieve information from the server in the body of the response, it should be a GET request.
 
@Stephane There is no rule that says that either request should cause the page to reload, you can make both over ajax, but what you should not do is use POST to retrieve data from the server or use GET to perform an action.
Hence if you want to alter the state of the server and retrieve information from it, you either have two requests on the client side, or you use PRG to give the control of the second request to the server.
 
Tom
Hi, question. I want to use an autoloader to load my classes. But there is already an autoloader registered in the current application. Is it possible to 'wrap' the existing library? So when wanted class==my class { loadclass } else { call other autoloader }. The other autoloader could be anything. From joomla to zend framework
 
@DaveRandom I get that with php requests, but I'm still learning how to organize myself when it comes to ajax. I'll keep this in mind. I won't change this script because I need to finish for my meeting in two hours, but I will think about this when I write new ones.
 
5:06 PM
@Tom If you are psr-0 compatible you have a big chance of using anything
 
@DaveRandom I don't understand what you mean by "give the control of the second request". Isn't that just another client call? What the difference? In php, I would change the header location. How would that happen in this case without reloading the page?
 
@PeeHaa "I you have are"?
 
lol
And I'm not even really drunk :P
 
@Stephane Because if you have the server perform a redirect after the POST request, it is instructing the client where to get the result from. If you hard-code the second URL on the client side, then if/when you change the server architecture the client code has to be changed as well.
And yes, you still use header('Location:') - it only get applied to the XHR, not to the entire page.
Remember HTTP request != page load
 
Tom
PeeHaa, mmm tnx for the psr-0 tip:) will take a look into that.
 
5:10 PM
@DaveRandom oooh... ok, that makes sense. Thanks for explaining
 
You can do MVC in more than one way. The way I learned it, was from my programming teacher at the university. The controller collect data from the view, from view to model, and back and returning it to the place where the controller is instanced. Instead of using a lot of if-statements in the controller, I thought about using more than one method. And that was the question. — user1121487 1 min ago
internet makes me sad
 
@Tom spl_autoload_register has the exact purpose of allowing multiple chained autoloaders ;)
It works well as long as the autoloaders are well behaved
In particular, autoloaders shouldn't throw exceptions if they don't find a class (or some similar nonesense)
 
user1125394
"The controller collect data from the view" he does'nt mean in the web I think, more in a GUI
 
Tom
@NikiC ow wow, didn't know that. Thank you!!
 
Home time for me, laterz
 
5:20 PM
0
Q: How to filter a select nodeset with a PHP function?

hakreI wonder if and how it is possible to register a PHP userspace function with the XSLT processor that is able not only to take an array of nodes but also to return it? Right now PHP complains about an array to string conversion using the common setup: function all_but_first(array $nodes) { a...

ping @gordon :)
 
@tereško i know you are able to write lots of good content about MVC, i would realy like to see your own implementation of mvc as an open source project
 
@hakre pong
 
I'm fighting with XSLT.
 
@hakre reading.
 
@hakre Yeah, I used to be a huge XML/XSLT fan, but no longer.
 
5:22 PM
@hakre hmm. good question but I have no clue. would have to fiddle with it. maybe @salathe knows
 
Hello Experts...I hope I am not bothering you...Can you please look at : codepad.org/oujYGlOv
Its a simple php file
I need a little help as I am not pro
 
@hakre cant you do element[not(position() = 1)]
 
Anybody??
 
@PhillipMclauren What's your problem?
 
@Gordon the function is compressed. I actually do more sophisticated things in there (want to), so it was just to show that the array is modified.
Or better said the list is verified.
 
5:25 PM
@LeviMorrison thanks Levi...Just look at this file..this file shows Stats of profile views and visits thing...It should be showing till the current month..but It is showing till May only
 
I'm looking for distinct values easy to get. The xpath and xslt outlines on site don't do it and I don't have any clue why (I know that they work with xpath and I understand them somehow, but with XSLT me is going crazy)
 
codepad.org/oujYGlOv
 
@PhillipMclauren Too much code to look through. Narrow it down to the spot that checks dates and let me know.
 
@hakre hmm, when the usual xpath for distinct doesnt work, then no clue sorry
 
@Gordon tried on the document itself with xpath directly, will fiddle with that now. It does not work either, I might just be desparate. Anyway, I really was wondering why returning an array doesn't work straight away for the php function calls.
thanks for your help.
 
5:30 PM
@LeviMorrison tinypic.com/r/ea1kjm/6 See this image.
 
@hakre sorry, i really dont know. i rarely use the php function support because it's iffy
 
@Leigh: You got bounty ;)
 
Just check that those loops are working fine and mysql thing
I am the guy who install something by reading install.txt file so..Please help me.
 
@Gordon hmm, I wish the situation would be better than iffy.
 
@PhillipMclauren Sorry, but I am on the clock. I can't afford to spend THAT much time. If you can narrow your problem down to a specific section, I can take a glance, but that's really all.
 
5:32 PM
@hakre if you want to use xslt, make sure you check exslt.org. it has a few useful functions. I dont think, they help with your current problem, but they are handy
 
user895378
Question: if I'm reporting average socket transfer speeds should I do it in kilobits or kilobytes?
 
user895378
I know there's not really a right or wrong answer, but ...
 
@Gordon I ran over that page two days ago, but haven't looked into it yet.
@rdlowrey do both, so reading it does not need to do any calculations.
 
@LeviMorrison Ok buddy..just read the line from 368th line
 
user895378
@hakre sold.
 
5:35 PM
I think something is not working right there
@LeviMorrison Please help me..It took my whole day and I tried on many forms...but all in vain
forums*
 
@rdlowrey If you need to sell something do it in bits ;)
 
user895378
@PeeHaa hehe, very true. OMGZORS LOOK AT THESE TRANSFER SPEEDS! SO FAST!!!!!1111
 
And most people still don't get what is happening :P
 
@Tarun i guess i should make something like that ... too bad i usually waste all my free-at-pc time on listening to audiobooks
have been looping this song for an hour already
 
@LeviMorrison Any luck buddy?
 
5:57 PM
-1
Q: How to get all parents until a certain parent is reached

brentonstrineI need something in-between the functionality of .closest() and .parents(). I am applying some CSS to all parents of a certain element up to a certain parent. Right now I'm while looping up, but it seems like there is a better way to do this. var goUp = $(".distant-child"); while(!goUp.hasClass(...

op tells himself ideot in comment
 
@tereško yes and considering the fact that there are not any good open source project available to teach good practices you should that initiative .
Anyway have a good time :)
 
@brentonstrine: That awkward moment when your "I'm an idiot" comment gets more upvotes than the answer itself. — Madara Uchiha 24 secs ago
 
6:22 PM
@Gordon: I'm now just throwing a hammer I think: //name[not(. = following::name)]
 
I have said it before, but damn why do people have to use emulated prepared statements and the same named placeholders in queries in code I need to maintain :(
 
@shiplu.mokadd.im I wish you could cv to search :(
 
@PeeHaa he he
 
If I want to do a many-value-list insert to MySQL via PHP, e.g
INSERT INTO `table1` VALUES (1),(2),(3),...(100000);

Am I really suppose to construct it like this (e.g. PDO/MySQLi):

INSERT INTO `table1` VALUES (?),(?),(?),...(?);

$stmt->execute($values);

Where $values is an array {1,2,3...100000}
 
6:27 PM
if you are doing bulk-insert , it would be better to just sanitize each value and concat a simple query
 
@user17753 No: One prepare, One variable-bind, 100000 x change variable value + execute.
 
@PeeHaa Nowadays I search SO before Google or IRC
 
^ or what he said .. usually you would just import the table via CLI mysql client , and avoid all that mucking around with php
 
@shiplu.mokadd.im Even when you search on Google stackoverflow will come up ;)
 
yes for bulk inserts (imports and such), use cli tools, much faster.
stackoverflow.com/a/2361402/367456 - I'd say not an answer. But needs another two DVs to capture del-votes
 
6:32 PM
lol @google
How to kill your own share price in 1 easy step!
 
@GordonM huh?
 
@GordonM Must have been a temp :P ooooops lol
 
@PeeHaa You're fired
 
>Joe Saluzzi from Themis Trading said "you can't make those mistakes any more".
l0l
Anyway I'm out drinking. Cya all on friday
 
6:40 PM
I'm offended by your words! My solution is for you to stop saying things in case I hear them rather than control my own emotions. Thank you.
 
6:53 PM
@tereško Probably related to dailymail.co.uk/news/article-2219385/…
Guess what, we don't live in a free country!
 
@raina77ow , it's not the "one file - one class" guideline that is the problem, but the obsession with "everything is a class"
 
Anyway, off to work off excess rage at stupid politicians on the exercise bike.
 
Hello folks. Good afternoon, or whatever time it may be where you are.
 
hmm. if the CSS inspection in chrome shows the text-color of the element is red, but in the viewport it's black. How is that?
it even points to the rule where it sets red
 
7:06 PM
While you guys were complaining about politicians, I voted.
 
@GordonM wtf? not sure if uk is stupid or ... well, that must be it, there is no other explanation
 
user1125394
@hakre what about a:visited
 
7:22 PM
@cyril gosh.
 
Hello! How could I check if these characters exists in a string? (',!.) I am doing something like this, but this does not work: $other_signs = preg_match('/[\',\!\.]+/',$string);
I've looked around the net but can't get it to work
I know that this is regex, not php, but if you know the answer, please response. Thank you.
 
Is the nice person who told me about github.com/Lusitanian/PHPoAuthLib yesterday here today?
 
7:29 PM
@Lusitanian , hey , someone is look for you
also , as a side-note : OAuth sucks
 
@tereško Is there something you don't find "sucks"?
 
user1125394
@poolnoodl not even facebook there
 
@MadaraUchiha dark ale with blue cheese
 
but seriously , i dislike oAuth quite a lot .. then again i am one of those silly people who care about privacy
 
user1125394
7:33 PM
oauth tells you what particular details are asked to the provider
 
@Hypn0tizeR Looks okay-ish. What doesn't work?
 
Haha, my regex works, I were just escaping those elements before getting them :D
sorry, it looks like it's time to sleep for me
 
ehh ... time to recompile kernel
 
can someone tell me what a Wordpress slug is?
 
user895378
@InGodITrust Let me google this for you ... codex.wordpress.org/Glossary#Post_Slug
 
7:45 PM
@rdlowrey phew, thanks for that, hate making extra HTTP Requests! Cheers
 
@InGodITrust Not sure if sarcastic...
 
@SomeKittens neither am i :)
 
This is strange. Node.JS prompt (batch script running node app.js) actually allows colors in the windows terminal.
Yet, I can't get it to work outside node.js (eg, in PHP).
I would have thought that php test.php containing <?php echo "\033[31mRed Text"; ?> would have worked.
 
if so, why?
 
1. your scripts should be in separate file , otherwise they are not cached
 
7:51 PM
@tereško maybe it is a PHP file which processes and returns it in Javascript
 
@InGodITrust , the output starts with <script>
 
hands in the towel
 
@tereško That's kinda irrelevant.
 
2 mins ago, by In God I Trust
@tereško maybe it is a PHP file which processes and returns it in Javascript
 
@tereško That said, I kinda give up after seeing 16k rep suggest what he just did...
 
7:54 PM
@Christian that line was a response
 
@tereško Uhm, a PHP file can start with a <script> tag..
 
did you READ the example ?
 
@tereško No, I thought I'd just blindly comment.
 
@NikiC Moral guardians. Gotta love 'em
 
8:03 PM
@tereško Why? That's a legitimate question.
@tereško Beginner questions != bad questions
Not all questions need to be sophisticated and asked by well experienced users.
 
user1125394
@tereško you would put these big loops in the view, or call a function stored in the model (no.. joke) in utils
 
because it is too localized
 
I don't think it is.
It's a question I can imagine a new user asking.
Also, people use frameworks, deal with it. There are no popular "good" MVC frameworks. We still don't close every wordpress, PHPBB, and MediaWiki question we see.
 
Any textmate users in here?
 
@MadaraUchiha , wanna make a test ? Write an answer with "in model" with completely nonsensical explanation , and it will get accepted
 
8:11 PM
@poolnoodl are you OSX ?
 
I am.
 
@tereško It probably will be. Since that's what OP wants to hear.
But what OP wants to hear is often not the solution.
 
which is why he/she asked the question ... making it too localized =P
 
user1125394
model is the missing answer, there is view and controller so far, would be funny
 
@poolnoodl I don't use TextMate haha, Coda2
 
8:13 PM
@poolnoodl , did you come here with a legitimate question or are you making a survey ?
 
I was going to ask anyone who said yes if they had managed to find a tm bundle for php 5.4
 
@tereško But the question will have value after it is properly answered, even if not accepted
A guest from Google searching about where to format SQL results, will see your answer and educate.
 
Some windows apache fun: serverfault.com/questions/439965/…
It's one of these days where nothing just works out of the box argl.
 
first time compiling kernel for a system is such a pain in the ars
 
@Nick does Coda2 syntax check php 5.4?
 
8:22 PM
@poolnoodl to be honest I'm not sure, I think it does I've never really noticed. I don't really need syntax check, I have error reporting for that..
 
the magic of XDebug
 
I actually have not seen any real use for XDebug :/
Aside from prettifying var_dumps(), and providing coverage for PHPUnit, I haven't seen any actual use.
 
it's also good for tracking down bottlenecks and prettifying error messages ... but that's about it
oh .. and for disabling @ error suppression
 
user895378
@MadaraUchiha Code coverage reports. That is a real use and no mistake. You are testing your code, aren't you?
 
user895378
;)
 
8:33 PM
eh there is remote debugging, too
 
@MadaraUchiha BLASPHEMY!
 
@hakre Apache 1.3?
 
Even if you use it for nothing more than a fancied up var_dump, xdebug is useful
And there's profiling, and single stepping.
 
@Christian if you test you test.
 
@hakre Yeah, sometimes I should get my grandma to use our new websites. She'd probably start by asking what mice have to do with it all...
 
8:42 PM
@Christian well that box is going to some friend soon who is happy because it can play DVDs.
 
@hakre Hey I've got VMs for DOS 5.5...I shouldn't be complaining :D
 
user895378
Anybody know off the top of their head if phpunit has some sort of $this->markTestFailed() method so I don't have to wade through the documentation or use a hack like $this->assertTrue(false);
 
@rdlowrey @depends?
 
user895378
@Christian eh ... not really what I'm looking for, but thanks
 
@rdlowrey You could always drop phpunit for an alternative that is smaller, easier and lesser dependencies... ;)
 
user895378
8:47 PM
@Christian PHPUnit works well for my needs, I generally know it pretty well at this point and it and hasn't caused me any grief in relation to its size, difficulty or dependencies :)
 
user895378
It's robust and it's a de facto standard. Tests are at least as much for other people as they are for you -- it's important to use a common API that others will understand.
 
user895378
If I need to learn some homebrew testing framework to work on someone's project I'm probably just going to move on and not bother.
 
@rdlowrey Well, I ended up writing my own clone. PHPUnit's dependency goes against my platform testing needs. :( It really is a clone - same assertion methods except the XML / Dom / Selector stuff, which I didn't deem too important at this point.
 
user895378
I see. All that said, the PHPUnit API and its documentation are not my favorite things in the world.
 
user895378
In case anyone was wondering ... In regards to this question:
 
user895378
8:51 PM
6 mins ago, by rdlowrey
Anybody know off the top of their head if phpunit has some sort of $this->markTestFailed() method so I don't have to wade through the documentation or use a hack like $this->assertTrue(false);
 
user895378
The answer is to do:
 
user895378
$this->fail('doh! my test failed');
 
@rdlowrey Yup. I'm always having a hard time figuring out stuff from the docs
It would help if there were a small API reference separate from the "text" docs
 
user895378
@NikiC Exactly.
 
Yeah, PHPunit, great tool PHPUnit docs? Not so great.
 
user895378
8:52 PM
I'd much rather scan a list of public methods and their signatures because I could easily pick out what I'm looking for in most cases.
 
Well, what do you know...fwrite(STDOUT, "\007");(bell) actually works! Even on windows!
 
I do like assertTrue (false) though, it's almost zen.
 
Any chance someone knows of a guide to using github.com/Lusitanian/PHPoAuthLib ?
 
@Christian Now if you could only get it to play the theme from Goldfinger
 
@poolnoodl I guess @Lusitanian would know :-)
 
8:54 PM
@GordonM :D
 
or if I have to put an application on a publicly accessible url for it to work?
 
@rdlowrey $this -> fail ('epic');
 
user895378
@GordonM nice :)
 
Still, assertTrue (false) is just so zen I might start using it
 
9:09 PM
@rdlowrey Well, there are a lot .... ~~~~
 
The chapter on tests is fairly helpful, if only because it lists all the assert* methods in the sidebar.
 
9:29 PM
svn checkout. it's like in good old days. type the command and relax for a moment.
 
9:42 PM
Email: someone@someplace.com. Password: password. First name: First. Last name: Last');DROP TABLE users;--. There, the users table is gone.Shaquin Trifonoff 15 secs ago
 
9:56 PM
@ShaquinTrifonoff I really could do with making a Bobby Tables macro.
 
@rdlowrey 1 line message has larger icon to the left. What voodoo did you pull?
 

« first day (733 days earlier)      last day (4226 days later) »