« first day (510 days earlier)      last day (4456 days later) » 

12:35 AM
Quick pre-bed question :) Do you guys consider 0 to be positive or negative? Would you describe the condition >= 0 as checking for positive values?
Just looking for a consensus on a terminology thing.
 
I knew you'd do that
 
> 0 is neither positive nor negative.
its kinda what zero is
 
in the opinion of a mathematician, what about your opinion?
 
12:39 AM
Well to combat your wikipedia link, en.wikipedia.org/wiki/Signed_zero
 
do you even understand the context ?
 
That's kind of insulting, but I know thats just how you are
 
do you know how numbers are stored in memory ?
 
Again, insulting
 
because you are ignorant
 
12:42 AM
@Leigh zero is non-negative and non-positive
 
there is a signed zero in computer science , because of the limitation cause by binary storage
where first bit is storing the sign of a number
 
@tereško: I know why
 
then you are just a troll
 
@Leigh Say, 'Non-negative' for >= 0
 
@tereško: And actually in the context of signed integers, 0 is 0, the value of the first bit will not yield a negative 0
 
12:46 AM
 
@tereško relax
 
@LeviMorrison Thanks, thats the kind of reply I was looking for.
 
@ircmaxell , it;s the allergy
@LeviMorrison , zero is as much "non-negative" as it is "non-positive"
 
@NikiC: I'll add one thing to make -j4: ./configure --disable-all --disable-cgi
 
that's by there is a distinction in math between non-negative and positive numbers
 
12:52 AM
@tereško: All I did was ask if it was incorrect to describe a condition of >= 0 as accepting positive numbers. Your allergy is self inflicted.
 
and you got an answer, that 0 is not a positive number
which you could not comprehend .. oh well .
 
All you managed to do was provide a link, instead of being able to explain yourself. I guess you had to look up the answer yourself before you got all pissy
 
And I comprehend the technical aspect of it just fine. Like I said, I was asking about a terminology point of view
 
1:24 AM
@tereško I understand that zero is non-positive also. But for his range of >=0, non-negative is the proper term.
@rdlowrey poke
 
user895378
@LeviMorrison Your timing is ridiculous. I just walked into the office and sat down.
 
@rdlowrey :) How was your day?
 
user895378
Good. Productive. Yours?
 
user895378
It's amazing how much I can accomplish when I make myself minimize the browser instance containing this chat room :)
 
lol
I began my new job today. It was quite nice.
I'm developing applications for an SEO company.
 
user895378
1:38 AM
Sounds cool. So I assume then that you're basically helping them develop underlying code that doesn't tell search engines to shove it.
 
This company is a bit different because users subscribe to the SEO service and the website walks them through the SEO, and then have tools to verify that the task was completed properly.
So I'm writing applications for their users mainly, and on occasion I'll develop something for the company itself.
 
user895378
I see. I think it would be difficult to explain to the uninitiated customers that good SEO means good underlying code, but more importantly, good, frequently updated content.
 
user895378
They want to put up a static page and be number one on the SERPS immediately without ever updating the page.
 
user895378
They don't want to hear that they can't just pay for it once and be done with it.
 
user895378
"Wait, you mean I have to keep updating this thing? Is this a ploy to get me to have to keep paying you?"
 
1:42 AM
Some people can't afford to pay someone to do it, though. It's a pretty successful endeavor.
The rate is MUCH lower than hiring someone.
 
user895378
That's cool. I'm not knocking the business model, I'm knocking the customer :)
 
user895378
Who may be smarter than I think if they're correctly seeking out your employer.
 
user895378
At least I know they're hiring quality people.
 
Word
 
It's also a true monthly model, not `9.99 a month*`

* But you subscribe for a 6 months period.
 
user895378
1:45 AM
@ircmaxell What's up dude. So, I've successfully eliminated all my sneaky backdoor service locator issues. Thanks for being like, "Hey moron, that thing you just said not to do? Yeah, you just did that"
 
working on my patch :-D
Oh, and wait until my blog post tomorrow :-P
 
@ircmaxell I am excited. :)
 
user895378
I'm assuming this is for the current dev branch, not the mythical PHP 6 BC buster?
 
user895378
I was absentee on here for most of the day, so haven't seen updates
 
@rdlowrey Just updated Artax. Woah. You've been busy :)
 
1:47 AM
@rdlowrey for Trunk
but my blog post is right up your ally @rdlowrey
 
user895378
@ircmaxell Awesome. What's the viewership maximization synchronize your watches release time for Friday blog posts?
 
10am
EST
 
user895378
@LeviMorrison Yeah, I pretty much changed a butt load of stuff. No more config. At all. Just a debug flag. Check out the events.php example
 
user895378
@ircmaxell Go-Go Gadget Alarm Clock!
 
Basically, Mediator is about 1/5 of the post :-D
and there are 11 classes and 2 interfaces in the post
 
user895378
1:52 AM
Woah that is up my alley. I did catch something earlier about you not finding any correct observer pattern PHP implementations.
 
not usages
 
user895378
Oh. Semi-related: I think posting them when you do is very smart, personally. What do I do every Monday? Catch up on all the new worthwhile subject matter from the weekend and start of the week. And Friday afternoons? Slack off and catch up on all the reading I didn't do during the week.
 
:-D
that's just how it worked out this time though
 
user895378
Here's a question: what do you guys think about by default rebinding any closure event listeners to the Mediator instance? My reasoning is that every Closure needs access to the mediator to be able to trigger other events. Object listeners will already have a mediator injected as a dependency when they're created.
 
user895378
As compared to explicitly specifying a listener as:
 
user895378
2:00 AM
function() use ($mediator) {}
 
I don't, why does it need it...?
 
user895378
It doesn't I don't know why I want to rebind so badly.
 
user895378
:)
 
If PHP 's lambda syntax was nicer, say \() : [$mediator] {} then I'd say don't bind it automatically. If I am really leveraging the system, I'd be annoyed by having to bind it all the time.
 
@rdlowrey yeah, keep in mind, I may want my closure bound to another object, and your rebind will break that
 
2:02 AM
Also: what if the function passed is a method? You don't want to rebind it, either.
 
user895378
@ircmaxell Well, when a listener is attached you have an optional boolean $rebind parameter that prevents auto-rebind
 
user895378
Well, only closure listeners get rebound
 
@rdlowrey I just see the usages of the re-bind far fewer than the disadvantages
and I dislike boolean parameters
 
user895378
Yeah ... I know you're right ... sigh
 
@ircmaxell I don't like them either.
It's like . . . request('GET', '/test.php', false). What's false, again?
 
user895378
2:05 AM
@LeviMorrison Regarding this, what would you think about maybe altering the Mediator::pushAll to allow you to optionally specify a rebind target object on a per-listener basis?
 
user895378
That may be a bit much.
 
user895378
I mean, personally, I won't use closure listeners very much. I'll slap an object with a magic __invoke method in there. I'm just trying to find ways to make the Closure listeners as useful as possible without being evil.
 
Well, I don't like cosntants for that purpose either
for example, md5($str, $return_raw) should really be md5($str) and md5_raw($str). If you need a boolean to switch what it does, you are doing too much...
 
user895378
That's a good point
 
@ircmaxell In my tiny JavaScript lib, there are two functions: async() and synch(). No more boolean for XMLHttpRequest :)
 
2:08 AM
@LeviMorrison ++
at least for public apis
 
user895378
@LeviMorrison I just did a rollback to HEAD^ to kill the auto-rebinding of Closure listeners to the Mediator instance, you may wanna re-pull
 
@rdlowrey Oh, no worries. I'm working on the JavaScript for my little project at the moment :)
 
user895378
Anytime the first comment in a diff starts with Ugly hack to ... you know it's gonna be interesting
 
@rdlowrey :)
 
2:23 AM
:-D
 
2:34 AM
@rdlowrey Sadly I had to write too many of those types of comments today :(
 
woah... this comment on internals took me back
> And, I very much enjoyed seeing someone as skilled as Anthony crank out a quick proof-of-concept
 
user895378
@ircmaxell THAT'S always nice to hear
 
And here's my POC post: news.php.net/php.internals/58800
@rdlowrey especially among all this heated debate.
especially since this is the most C I've written in nearly 15 years
 
user895378
I guess people don't seem to care as much about the quiet data loss from casting?
 
@rdlowrey I just wish they'd validate instead of cast. Perhaps I'm just a fool.
 
user895378
2:43 AM
@LeviMorrison PHP 6, my friend. I heard it's coming out soon. They've even got books out that cover it.
 
lol :)
 
@LeviMorrison this does validate
the same as internal functions
 
I am going to disagree on your use-case semantics.
 
It doesn't validate, it DOES do some casting.
 
2:46 AM
sure, but exactly the same as zend_parse_parameters does.
 
Perhaps I haven't been clear: I don't like that behavior :)
 
well, that's fair, but at least this is consistent :-P
 
Tom
3:08 AM
@andrewjackson then don't act like a total smartass.
 
@Tom what?
 
@rdlowrey Watcha doin'?
 
Is it just me, or has Tom been inactive for a while?
 
user895378
@LeviMorrison Eliminating everything that's not 100% necessary to the dependency container. Fortunately, that implementation is not inherently evil. And it's not something that I want the Bootstrapper to automatically instantiate. If someone wants to use it they can call new Artax\Ioc\DepProvider themselves.
 
user895378
After today's refactor I really feel like my wheels are rolling. Everything's making sense now. And is magically getting lighter and lighter.
 
3:12 AM
@rdlowrey Sounds good.
I'm excited to use it, btw.
 
user895378
Me too!
 
user895378
The event chaining is sweet
 
I just need to wait until it's . . . well, not stable, but . . . stable-ish if you look at it with your eyes crossed.
 
user895378
Yeah I def get that
 
> Perfection is achieved not when there is nothing left to add, but when there is nothing left to remove...
 
user895378
3:14 AM
It's been completely different on a daily basis so far, but I think that's really about to stop
 
user895378
@ircmaxell +1
 
:-D
 
user895378
Mnsr. Saint-Exupery
 
I love that quote, by the way.
Although the translation I like sounds better :)
 
which?
 
user895378
3:16 AM
@LeviMorrison Oh, one thing: It occurred to me that dot.namespacing event names can't happen because you can't do:
 
user895378
$c = new StdClass; $c->event.name = function() {}
 
> Perfection is achieved not when there is nothing left to add, but when there is nothing left to take away.
I think.
 
user895378
So your built-in events are simply: exception and tearDown
 
@rdlowrey $c->{'event.name'};
 
user895378
Oh duh.
 
user895378
3:18 AM
well, still, that seems like a small annoyance I don't want to deal with ...
 
user895378
Well, now I don't know
 
I'm not sure I see the problem.
 
@rdlowrey wait, you're using chaining?
 
$stdClass = new StdClass;
$stdClass->join = function() {};
 
user895378
@ircmaxell No, that was not the correct term
 
3:19 AM
Oh ok, because that's a pattern that I cover in tomorrow's post :-D
 
user895378
They're not chaining at all in a technical sense
 
user895378
It just seemed like the most logical term for what was happening
 
fair enough, I understand the point
 
user895378
@LeviMorrison Okay then, final vote: app.exception and app.tearDown or exception and tearDown? And no changes from here
 
@ircmaxell Thoughts on ^ ?
 
3:22 AM
@LeviMorrison thoughts on what?
 
user895378
@ircmaxell built in event names for uncaught exception and shutdown events:
 
user895378
app.exception and app.tearDown or exception and tearDown
 
I would do un-namespaced, since they aren't really application specific, they are process specific (you could have app shutdown events, which fire after render, but before execution ends, etc)
 
user895378
Sold.
 
and why tearDown instead of shutdown?
 
3:25 AM
Because there is setUp, and they match PHPUnit lol
 
user895378
Well, there's not a built-in setup anymore ...
 
user895378
I killed it. It's dead.
 
well, I would do setUp and tearDown at the app level, and then shutdown at the process level
so app.setUp and app.tearDown, and a global shutdown and exception
 
@rdlowrey I missed that change, I guess.
 
(it leaves the door open for multiple applications to run in the same process)
 
user895378
3:28 AM
@LeviMorrison Well, there's really no way to build it in now, because the bootstrap just spits out the instantiated mediator instance with no pre-populating by user-specified listeners.
 
user895378
There's really not a need because the framework just boots up an empty mediator for you. You can populate it with whatever you want.
 
@rdlowrey That's fine. If there isn't a setUp, then shutdown is more logical than tearDown, I guess.
 
user895378
Of course, I'll be using my own app.setUp and app.tearDown
 
Naturally.
 
user895378
Allright. exception and shutdown are the built-ins.
 
3:30 AM
It is absolutely frigid in my apartment. brb
 
user895378
Settling on those event names will allow me to start in on the "Error Handling" wiki. Woot.
 
user895378
Oh, and btw, 72 degrees in lovely Myrtle Beach today. Another three or four weeks and it'll be time to whip out the old spring suit and surf!
 
user895378
And my productivity may take a bit of a dip ...
 
Ugh, the people we live with had the thermostat set at 50 deg F. I moved it up to 65. My wife would be very upset if she came home and it was that cold.
 
user895378
OMG 50.
 
3:35 AM
It's definitely still winter here in Utah.
 
user895378
You should invest in a $30 space heater. Those things are money.
 
We had an old one but it burned out. Literally. I saw the fire.
 
user895378
Haha yeah I think I heard somewhere that Utah is hard on space heaters
 
user895378
@LeviMorrison Okay, last question (forever) on Closure event listeners. Should I just kill the ability to auto-rebind on attach? Is there a non-evil use-case someone could have to say, "I WANT ALL OF MY LISTENERS REBOUND TO THIS AUTOMATICALLY"
 
user895378
@ircmaxell Also, any opinions on ^?
 
3:42 AM
You know, you could just pass the mediator to the function . . .
 
user895378
Yeah, that, or if you know you want it rebound, you just do function() use ($myObj) {}
 
user895378
Well, not rebound, but you need access to $myObj
 
Yes, kill auto rebinding...
 
If $this is rebound, can you access protected/private data?
 
user895378
I believe you can tell it to do that, but not by default, no.
 
3:46 AM
That's the only useful use-case I can think of.
 
user895378
Well the thing is you can rebind your own closure. You don't need the mediator to do it for you ...
 
user895378
Dear Closure Auto-Rebinding: I'm sorry, it's just not working out. It's not you, it's me. Well, it's actually more @ircmaxell, but you know what I mean. Thanks for the good times.
 
@rdlowrey Love, Your Maker
 
user895378
:-D
 
user895378
Don't call me. I'll call you.
 
3:50 AM
lol
 
Lol
 
I hate PHP < 5.4
$PdoStatement->execute(array('id' => $id));
That should be: $PdoStatement->execute(['id' => $id]);
 
user895378
The short array syntax has made my life
 
I've already grown fond of short-syntax.
@ircmaxell or anyone: SELECT counter_field FROM child_codes FOR UPDATE; UPDATE child_codes SET counter_field = counter_field + 1; Can that be done in one query in Pdo or mysqli?
 
user895378
 
3:57 AM
One query?
 
user895378
@LeviMorrison Oh, sorry, I misunderstood your quesiton
 
@ircmaxell One statement, really.
 
ummm... Is that the literal query?
because that doesn't make sense at all. You're selecting a tree of columns, and then referencing it as a value
are you trying to increment a field?
 
Yes, and retrieve the updated value.
I'm pretty sure it is valid MySQL, dunno about other dialects.
 
retrieve the updated value?
that will always be two queries then
 
4:07 AM
@rdlowrey The other 5.4 thing I love: JsonSerializable;
 
user895378
@LeviMorrison I haven't spent any time with it yet. All my 5.4 has been with the Artax situation, but I'm looking forward to it.
 
user895378
It's going to make js interaction so much simpler
 
@rdlowrey Yep. <3
 
user895378
Is it bad that we get so geeked up (no pun intended) about new language features?
 
:-D
 
4:24 AM
@rdlowrey I'm almost finished with this little thing.
Might get time to work on Artax :)
 
user895378
Awesome. I'm just glad I'm getting my side of things ironed out so you're able to
 
hey
hey
can I ask question related to how files are converted?
 
user895378
@hey Just ask. If someone can and wants to help they will.
 
hey
Ok.
So, file, for example, picture, is a binary file (zeros and ones). But, why do we need uuencoding to send files through e-mail?
 
4:43 AM
@hey Everything is stored as binary.
 
hey
@LeviMorrison: Why do we need uuencoding then to send pictures for example through e-mail? Why couldn't it just send binary data? Sorry for noobish questions
 
@hey Encoding describes how something is formatted, the pattern of the zeros and ones, if you will.
 
@hey because the email transfer (SMTP) spec (RFC 822) officially says that messages can only be 7-bit ASCII text. So, no binary or non-ASCII content without special encoding.
 
hey
@David: But why did they do it this way? Why did they do that message could be only 7-bit ascii text?
 
user895378
@LeviMorrison Random thought. I strongly prefer all caps TRUE, FALSE, and NULL.
 
4:54 AM
@rdlowrey Really?
I mildly prefer all lowercase.
 
user895378
Well, not STRONGLY
 
user895378
On second thought, I don't care.
 
user895378
Do whatever you want.
 
user895378
As long as it's not False True Null
 
Yeah, I don't like that either.
I STRONGLY dislike that.
 
user895378
4:56 AM
It's terrible.
 
user895378
Last time I checked, Null was not a proper noun. I've never met a Mr. Null.
 
user895378
And there are no cities (or there shouldn't be) named Null.
 
hey
If anyone has any more thoughts, please reply, I will be very grateful. Bye.
 
@hey It was 30 years ago - before Unicode, in the bad old days where the "top half" (high ASCII) was different on every system, and EBCDIC was still around. Things are much better now - so we have things like MIME.
 
@rdlowrey Do you know JavaScript very well?
 
user895378
5:07 AM
@LeviMorrison There was a time when I knew it very well, but I've done next to no js in the last year or so. So I may or may not be able to help.
 
I'm struggling to update the content of a span element.
Sounds noobish, I know.
 
user895378
Are you just using straight js or a framework?
 
Plain JS.
I'm fine with XPath and XMLHttpRequest and other high-level stuff.
Can't change the value of an element :/
 
user895378
Well, I believe technically .innerHTML isn't 100% semantically correct but you can ...
 
user895378
var myDiv = document.getElementById('myDiv');
 
user895378
5:10 AM
myDiv.innerHTML = "new";
 
Didn't work :/
 
user895378
It's like the horribly nearsighted leading the blind, then :)
 
user895378
It's sad, when I do any js these days it's usually in the confines of jQuery (which allows me to be rusty with real js and get by). I forget how to do things the real way.
 
Well, perhaps it is because I grabbed the element via XPath.
 
user895378
5:15 AM
Any idea what the easiest way to generate an E_FATAL in php would be so I can double check the shutdown event behavior?
 
document.getElementById('the_id_of_div').innerHTML = 'Fred Flinstone';
^ @Levi
 
@rdlowrey I think you can call die. lol
 
@rdlowrey
lol, try divide by 0?
 
@tehlulz That isn't fatal.
 
Of course it is.
:P
 
user895378
5:17 AM
@LeviMorrison really? die?
 
(I was joking)
 
user895378
Nope, die didn't work.
 
@rdlowrey Darn, I guess it is just a dupe of exit.
 
<?php
echo "start";
@ini_set('memory_limit', '1M');
$test = "a";
while (1) {
$test = "a" . $test;
}
echo "done";
?>
that should cause a fatal error
 
user895378
5:20 AM
@LeviMorrison problem with that is it only generates user level errors. You can't self-generate an E_FATAL
 
Did my code work @rdlowrey
 
user895378
@tehlulz Ahhh there we go. That's what I like to see. A nice, juicy out of memory error
 
@rdlowrey I should open a bug report. I can't create a fatal error? Come on.
 
user895378
@LeviMorrison Yeah I know that because I had tried before
 
user895378
Though not with 5.4 ... of course I'd be shocked if someone deemed it worthy of their time to allow morons like me to trigger an E_FATAL ON PURPOSE
 
5:23 AM
@rdlowrey We need an easy way to do it.
 
user895378
Though I agree, it seems like people would want to be able to test their register_shutdown_function callback for handling fatal errors
 
user895378
I know I've wanted to at different points
 
user895378
Here's something related that has driven me absolutely insane before:
 
user895378
Even if you do ini_set('display_errors', FALSE); at runtime, if you generate an E_FATAL and your php.ini has display_errors = On the fatal error traceback will still output.
 
user895378
I once nearly pulled my hair out trying to figure out WHY my shutdown handler wasn't preventing the output when I told it to on fatal errors
 
5:31 AM
<3 PHP
 
lol
@rdlowrey
php your only language?
 
user895378
no
 
I started looking at node.js, but not sure Im a fan of it for web dev
 
user895378
I haven't looked into node.js ... I think I'll give it some time ... I'm not convinced it's going to be around forever
 
@tehlulz JavaScript is not fit for server-side development. I could on for hours about why.
 
5:33 AM
What are your personal opinions regarding the PHP vs Rails debate?
 
user895378
@LeviMorrison Also agree with that.
 
user895378
@tehlulz Ask github.
 
not in terms of popularity :P
 
I think node.js fits a need. People said the same thing about PHP (some still do, emphatically). The longterm will decide if it's ultimately viable enough.
 
user895378
Honestly I've never written a line with rails, so I don't have a good opinion. I know more than I care to about PHP though, so it wouldn't make a whole lot of sense for me to switch without a good financial reason
 
5:34 AM
@LeviMorrison - I'm not disputing you may have a point, but do you have any information that explains why that is? I'd just like to review anything that's out there.
 
user895378
I've had a very difficult time testing javascript myself
 
user895378
Perhaps as it becomes a more mainstream development language more tools will come about that make enterprise-level development less of a headache ...
 
user895378
but it still seems a bit like the wild west in that regard, IMHO
 
As stuipid as it sounds, I wonder if PHP is going to die :/
 
@JaredFarrish 1. Type detection is TOUGH. (Try to see if something is an array) 2. Try unit-testing. 3. Connect to a database. 4. Prototypal inheritance != polymorphism. THIS IS HUGE.
 
user895378
5:40 AM
I think people underestimate how easy it is for the masses to break into low-end programming with PHP. It's a numbers game ... there are probably 1000 people who will dabble in PHP (with zero programming experience) for every 1 person who graduates with a compsci or equivalent degree. Of those, you will more than likely get a couple who end up being highly skilled.
 
user895378
Don't underestimate the appeal of low barriers to entry.
 
user895378
PHP makes it really, really easy to get a simple web site up and running.
 
@LeviMorrison - Sure, but facts don't necessarily indicate viability. Critics had some of the same criticism of PHP in comparison to Java, C#, etc., but they missed the point that it was uniquely suited to challenges that weren't always obvious to enterprise waterfall-led, test-driven intelligentsia. And PHP evolved. I imagine Javascript will as well. We'll just have to see.
It's entirely possible newer developers who either don't care or just don't know about the "importance" of concepts will find a way to muddle through and still produce compellingly capable software.
 
@rdlowrey, do you use any frameworks such as code igniter or cakephp?
 
user895378
@tehlulz ewww gross
 
5:42 AM
lol
just getting other coders opinions :)
 
@JaredFarrish I do those things on a day-to-day basis. If the language makes it a PITA to do that, then I am sorry, it is not going to work out between us.
 
user895378
@tehlulz From the perspective of software engineering quality, I think the popular frameworks are garbage.
 
user895378
I think (the new) Symfony comes the closest, but it does a couple things that I would consider dealbreakers.
 
@JaredFarrish By the way, I'm having trouble changing the innerHtml of an element.
var image = JSON.parse(request.response);

var node = document.getElementById('rating-' + image.id)
var rating = node.innerHtml;
console.log(node);
 
@rdlowrey, i prefer rolling with my own. Also, are you a fan of using MVC?
 
5:45 AM
That's a personal decision. It doesn't really speak to whether a language will be capable in producing something that does, despite itself, somehow seem to work.
 
user895378
@tehlulz Yeah, but I've spent A LOT of time lately working on a framework for event-driven applications
 
@JaredFarrish Any thoughts? The node exists, the image is populated. No change.
 
user895378
I think if you're doing any sort of team-oriented work MVC is generally the way to go. It's well understood by any decent programmer. You can bring people in and out with low friction.
 
This line is accessing, not setting: var rating = node.innerHtml;
 
what if its a project by yourself?
say a social media website
 
5:47 AM
@JaredFarrish Oops, next line is node.innerHtml = image.rating;;
 
To set the .innerHTML, it would need to be something like node.innerHTML = 'something';.
 
I just missed a line when copying/pasting
 
What is an example of request.response?
 
That part is all-good:Object
description: "Logo for current php.net"
id: "2"
path: "F6A59C0A-1B22-4E83-A921-96FF0640A797.gif"
rating: "17"
submissionDate: "2012-03-07 22:01:31"
title: "PHP Logo"
__proto__: Object
 
is there anything wrong with using normal mysql functions instead of mysqli?
 
user895378
5:48 AM
@tehlulz I would definitely say a MVC tool is the way to go. If you don't want to spend a lot of time developing something really detailed for yourself, I think Symfony 2 (not the earlier ones) would be a really good bet. My issues with it are essentially academic. The framework will do exactly what you want very well.
 
@tehlulz Yes.
 
user895378
@tehlulz Yes, definitely don't use mysql it's a very easy transition to mysqli
 
user895378
All right, no more chat, gotta get back to work
 
This just came in on php-webmasters mailing list:
> ERRORS OF APACHE 2.0 AND PHP 5.3 AND XAMPP 1.0-1.7.7 IN PHP MEDIUM SIZE ODE FILE IN FIRST FORM ON TEXT END OF HEAD FORM ">" GET ERROR OF VISION FORM N BROWSER (INTERNET EXPLORER), IN IF OPERATOR INSTEAD OF COMPARE WITH "=" THEY MADE A APPROPRIATE (ADOPT).
 
What is an example of image? I assume it's an HTMLImageElement, but how can I replicate it in markup?
 
user895378
5:52 AM
@LeviMorrison Nice
 
@JaredFarrish It's just <span class='rating' id='rating-2'>9</span>
 
SpK
Hi all i'm new to PHP i need some clarifications?
 
user895378
@tehlulz The main reason to use mysqli is prepared statements. They'll keep you from sucking it up from an SQL injection attack. Here's a tutorial on it: mattbango.com/notebook/web-development/…
 
Cheers
 
user895378
@SpK Just ask and if anyone can and wants to help they will
 
5:54 AM
do you have a method you use for sanitization handy?
moreso parsing to HTML
 
@LeviMorrison - So var rating = node.innerHTML; should be ignored? It doesn't look likes it's used.
 
user895378
@tehlulz do you mean for sanitizing database input? or sanitizing something that you'll later show in HTML form (and you need to avoid XSS attacks)?
 
well both; More for XSS though.

I use a SafeString class
 
@JaredFarrish Not within the scope. Interestingly, it IS populated.
 
so id be like
echo "Welcome {$username->toHtml()->val()}";
 
5:57 AM
@tehlulz Ick.
 
user895378
@tehlulz I would recommend HTMLPurifier If you think you might ever want to allow minimal html tags in the input. Otherwise, something on the order of htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); is generally sufficient
 
@JaredFarrish Bingo. I used innerText instead.
 
user895378
@tehlulz For sanitizing DB input, that's what the prepared statements in mysqli do for you so you're always covered.
 
@Levi; lol, yeah. Well I often wonder in terms of performance
@rdlowrey so just using htmlspecialchars is generally that sufficient?
 
user895378
@LeviMorrison Have you been fighting that same <span> all this time?
 

« first day (510 days earlier)      last day (4456 days later) »