The new debug_backtrace() function is actually not documented yet even though it's in the newly released 4.3.0. Now that I have 4.3.0, I get to play.
First misconception: You'd think it would actually print a backtrace. Instead, it returns an array containing lots of nifty information that you have to print out yourself.
Given this PHP code:
<?php
function foo(){
echo "<pre>"; print_r(debug_backtrace()); echo "</pre>";
}
function bar(){
foo();
}
foo();
bar("baz");
echo "<pre>"; var_dump(debug_backtrace()); echo "</pre>";
?>
You get the following output:
Array
(
[0] => Array
(
[file] => /home/keith/public_html/dispatcher.php
[line] => 48
[function] => foo
[args] => Array
(
)
)
)
Array
(
[0] => Array
(
[file] => /home/keith/public_html/dispatcher.php
[line] => 46
[function] => foo
[args] => Array
(
)
)
[1] => Array
(
[file] => /home/keith/public_html/dispatcher.php
[line] => 49
[function] => bar
[args] => Array
(
[0] => baz
)
)
)
array(0) {
}
As you can see, when just foo is called, you get a call trace for just foo. When bar is called, you get the call trace for both foo and bar. In addition, you can see that debug_backtrace() returns nothin (but an empty array, of course) at the top level.
In addition, debug_print_backtrace(), which I assume actually prints the backtrace formatted in some way, was added in a recent version of CVS. This function didn't make it into PHP 4.3.0.
I just noticed, because of an error message that now points to the PHP documentation, that Hosting Matters just upgraded the server my site runs on to PHP 4.3.0. Woo. --with-pear too, which I don't think we had before (now I can try out ITX if I want to
). 4.3.0 has GD included, so I may do funky stuff with graphics soon 
But oops, they didn't compile it with the IMAP libraries, so now my e-mail program doesn't work... time to put in a support ticket...
I also noticed that the use_trans_sid session flag was re-enabled for my site. It turns out it's only changeable at the "PHP_INI_SYSTEM" and "PHP_INI_PERDIR" level, and can't be changed at run time by ini_set, even though the code I used before:
<?php
ini_set('session.use_trans_sid', '0');
?>
seemed to disable it. So I wonder if this is a new restriction on it. Anyway, I disabled it at the .htaccess level by adding this line:
php_flag session.use_trans_sid off
As a side note, aside from the output of PHP's highlight_string() and similar functions not being valid XHTML, their URL rewriting isn't valid either because it doesn't escape the ampersands (&) that are added to URL's to append the PHPSESSID. Though, Mark Pilgrim probably doesn't care anymore 
Mark Pilgrim is pissed:
I know, I know, XHTML 2.0 isn't meant to be backwardly compatible. But damn it, I've done everything the W3C has ever recommended. I migrated to CSS because they told me it would work better with the browsers and handheld devices of the future, then the browsers and handheld devices of the future came out and my site looked like shit. I migrated to XHTML 1.1 because they told me to use the latest standards available, and it bought me absolutely nothing except some MIME type headaches and (I am not making this up) Javascript incompatibilities. I migrated to semantic markup that has been around for 10 fucking years and they go and drop it. Not deprecate it slowly over time, mind you, but just fucking drop it. Which means that, after keeping up with all the latest standards, painstakingly marking up all my content, and validating every last page on my site, I'm still stuck in a dead end.
I can attest to the Javascript incompatibilities. I found it impossible to correctly write Javascript within XHTML 1.1 that validates and runs. I may dig up the content on my weblog and post it here for reference.
Hell, find me another site that even uses XHTML 1.1.
I do
Not that it means anything, I suppose.
revjim complains a bit about h1-h6 disappearing. I think that XHTML 2.0's header and section scheme makes more sense and is more consistent. On the one hand, people might not readily upgrade unless you force them, but it seems reasonable that there should be an XHTML "transitional" that allows some of the deprecated tags in order to ease migration.
Via Slashdot, check out The Open Web Application Security Project (OWASP) and their PDF of The Ten Most Critical Web Application Security Vulnerabilities (PDF)
The Open Web Application Security Project (OWASP) is dedicated to helping organizations understand and improve the security of their web applications and web services. This list was created to focus government and industry on the most serious of these vulnerabilities.
Using this list, organizations can send a message to web site developers that "we want you to make sure that you won't make these mistakes." The security issues raised here are not new. In fact, some have been well understood for decades. Yet for some reason, major software development projects are still making these mistakes and jeopardizing not only their customers' security, but also the security of the entire Internet.
This stuff looks like a must-read.
Slashdot: Palm Kills Off Graffiti
NotesHolder looks like a fairly neat program. A!K Labs seems to have some other nifty software available too.
Advogato.org: The case against crawler918.com. I actually have the following code in my main include file to block crawler918.com:
<?php
if($_SERVER['REMOTE_ADDR'] == '12.148.209.196'){ #blocking crawler918.com
die("Get your shitty crawler out of here");
}
?>
I didn't even know anything about their evil intentions outlined in the article on Advogato -- their crawler is just really bad, and kept requesting invalid pages on my site, generating 404's, which made my site send me lots of e-mails about those 404's. Crawler918.com is evil.
Washington Post: Key GOP Senators Object to Bush Plan. The title isn't that helpful, but there's a lot of informative content in this article.
Kuro5hin: If You Are in High School Do This: "A guide to getting through what is sure to be a waste of your time."
When I was in high school, I was an expert at not going to class. I skipped at least 50% of them, especially in the last two years, and I think I learned more for it.
High school in North America is basically a waste of time. If you have the money or the good fortune to have gone to a school that places you in the right place, with teachers that cared, with students who challenged you, you were/are lucky. The average North American high school is just a place to keep you from committing crimes during business hours.
I'm not saying that we should eliminate all schools and let people figure it out. High school really works for some people. But, when you are expected to shut off your brain and attend for 4 years, a certain dissastifaction is inevitable. Then, followed by boredom, you are given no option but to disappear and figure it out for yourself.
So, what did I learn in those four years at Earl Haig Secondary School? How to actually learn something, despite what all my teachers taught me.
TV/Entertainment news: Christopher Reeve might have a recurring role on Smallville! He's currently about to shoot one episode as a guest star, but...
But Reeve's character could become a recurring element in the show's third season, Gough said. "We had a wonderful 45-minute conversation with" Reeve, he said. "Sort of pitched him the character and the character's sort of role, not only in the episode, but also in the series, because every hero needs a wise man. And that's really his role in the show. It's sort of the passing of the torch from one generation of Superman to the next."
Also, Alyson Hannigan and Alexis Denisof are engaged!
"I'm the luckiest guy in the world right now," a beaming Denisof said in an interview...
oh yeah.
Living Torah Journal: Joash and the First Temple.
Via RWN, ScrappleFace: All Prisoners Released from Jails in U.S.. Read this from RWN for more background. To finish off politics for this post, check out this excellent interview with Walter Williams at RWN. Even if you read nothing else in this Quickies post, read this.
Jeremy Zawodny: Sun could get a clue from PHP:
php.net docs: good.
Sun Java Docs: less good.
Also see his post on Hyperthreading Benchmarks with a link to an article on IBM developerWorks about it.
Oops, a little more politics, but it's rather closer to simple economics: Via SimpleLinks, If you overtax the rich, they may not come to dinner. Great parable.
Via Oliver, FAO Schwartz files for bankruptcy.
I didn't realize that FAO was in such bad shape. I guess as consumers are watching their wallets more, high end retalers like FAO Schwartz are taking the hit. And speaking of FAO Schwartz, we've probably gone in that toy store more than any other, since they have so many toys you can play with. But we've never spent a single cent there since everything is full retail price.
Scott: Catching the Pattern Wave
How to be a Superprogrammer.
Flirting with Prevayler. According to the (annoying) site, while caching your data every night, it keeps a log of every transaction so even in the case of a crash it restores the system to the state it was right before the crash. Seems similar to how journaling file systems work.
Charles: When is a constant not a constant?
Ha, Java programmers are idiots
God, this post wasn't "quick" (to write) at all.
One more: John Udell: Services and Links.
new⇒Johnny Walker Blue Label
Wow, thanks for the scotch review:D
Lagavulin and Laphroaig aresome of...
Keith: Aug 29, 3:35pm