mirror of
https://github.com/samsonjs/blog.git
synced 2026-03-25 09:05:51 +00:00
601 lines
31 KiB
HTML
601 lines
31 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Late static binding - samhuri.net</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<meta content="48.472,-123.3683" name="ICBM" />
|
|
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/xml/rsd" />
|
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/xml/rss20/article/430/feed.xml" />
|
|
<link rel="alternate" type="application/atom+xml" title="Atom" href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/xml/atom10/article/430/feed.xml" />
|
|
<script src="http://web.archive.org/web/20061018215014js_/http://sami.samhuri.net/javascripts/cookies.js" type="text/javascript"></script>
|
|
<script src="http://web.archive.org/web/20061018215014js_/http://sami.samhuri.net/javascripts/prototype.js" type="text/javascript"></script>
|
|
<script src="http://web.archive.org/web/20061018215014js_/http://sami.samhuri.net/javascripts/effects.js" type="text/javascript"></script>
|
|
<script src="http://web.archive.org/web/20061018215014js_/http://sami.samhuri.net/javascripts/typo.js" type="text/javascript"></script>
|
|
|
|
<script type="text/javascript"></script>
|
|
<link href="http://web.archive.org/web/20061018215014cs_/http://sami.samhuri.net/stylesheets/theme/island.css" media="all" rel="Stylesheet" type="text/css" />
|
|
<link href="http://web.archive.org/web/20061018215014cs_/http://sami.samhuri.net/stylesheets/user-styles.css" media="all" rel="Stylesheet" type="text/css" />
|
|
<link href="http://web.archive.org/web/20061018215014cs_/http://sami.samhuri.net/stylesheets/theme/print.css" media="print" rel="Stylesheet" type="text/css" />
|
|
</head>
|
|
|
|
<body>
|
|
<!-- BEGIN WAYBACK TOOLBAR INSERT -->
|
|
|
|
<script type="text/javascript" src="http://staticweb.archive.org/js/disclaim-element.js" ></script>
|
|
<script type="text/javascript" src="http://staticweb.archive.org/js/graph-calc.js" ></script>
|
|
<script type="text/javascript" src="http://staticweb.archive.org/jflot/jquery.min.js" ></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
var firstDate = 820454400000;
|
|
var lastDate = 1325375999999;
|
|
var wbPrefix = "http://web.archive.org/web/";
|
|
var wbCurrentUrl = "http:\/\/sami.samhuri.net\/articles\/2006\/07\/19\/late-static-binding";
|
|
|
|
var curYear = -1;
|
|
var curMonth = -1;
|
|
var yearCount = 16;
|
|
var firstYear = 1996;
|
|
var imgWidth=400;
|
|
var yearImgWidth = 25;
|
|
var monthImgWidth = 2;
|
|
var trackerVal = "none";
|
|
var displayDay = "18";
|
|
var displayMonth = "Oct";
|
|
var displayYear = "2006";
|
|
var prettyMonths = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
|
|
|
|
function showTrackers(val) {
|
|
if(val == trackerVal) {
|
|
return;
|
|
}
|
|
if(val == "inline") {
|
|
document.getElementById("displayYearEl").style.color = "#ec008c";
|
|
document.getElementById("displayMonthEl").style.color = "#ec008c";
|
|
document.getElementById("displayDayEl").style.color = "#ec008c";
|
|
} else {
|
|
document.getElementById("displayYearEl").innerHTML = displayYear;
|
|
document.getElementById("displayYearEl").style.color = "#ff0";
|
|
document.getElementById("displayMonthEl").innerHTML = displayMonth;
|
|
document.getElementById("displayMonthEl").style.color = "#ff0";
|
|
document.getElementById("displayDayEl").innerHTML = displayDay;
|
|
document.getElementById("displayDayEl").style.color = "#ff0";
|
|
}
|
|
document.getElementById("wbMouseTrackYearImg").style.display = val;
|
|
document.getElementById("wbMouseTrackMonthImg").style.display = val;
|
|
trackerVal = val;
|
|
}
|
|
function getElementX2(obj) {
|
|
var thing = jQuery(obj);
|
|
if((thing == undefined)
|
|
|| (typeof thing == "undefined")
|
|
|| (typeof thing.offset == "undefined")) {
|
|
return getElementX(obj);
|
|
}
|
|
return Math.round(thing.offset().left);
|
|
}
|
|
function trackMouseMove(event,element) {
|
|
|
|
var eventX = getEventX(event);
|
|
var elementX = getElementX2(element);
|
|
var xOff = eventX - elementX;
|
|
if(xOff < 0) {
|
|
xOff = 0;
|
|
} else if(xOff > imgWidth) {
|
|
xOff = imgWidth;
|
|
}
|
|
var monthOff = xOff % yearImgWidth;
|
|
|
|
var year = Math.floor(xOff / yearImgWidth);
|
|
var yearStart = year * yearImgWidth;
|
|
var monthOfYear = Math.floor(monthOff / monthImgWidth);
|
|
if(monthOfYear > 11) {
|
|
monthOfYear = 11;
|
|
}
|
|
// 1 extra border pixel at the left edge of the year:
|
|
var month = (year * 12) + monthOfYear;
|
|
var day = 1;
|
|
if(monthOff % 2 == 1) {
|
|
day = 15;
|
|
}
|
|
var dateString =
|
|
zeroPad(year + firstYear) +
|
|
zeroPad(monthOfYear+1,2) +
|
|
zeroPad(day,2) + "000000";
|
|
|
|
var monthString = prettyMonths[monthOfYear];
|
|
document.getElementById("displayYearEl").innerHTML = year + 1996;
|
|
document.getElementById("displayMonthEl").innerHTML = monthString;
|
|
// looks too jarring when it changes..
|
|
//document.getElementById("displayDayEl").innerHTML = zeroPad(day,2);
|
|
|
|
var url = wbPrefix + dateString + '/' + wbCurrentUrl;
|
|
document.getElementById('wm-graph-anchor').href = url;
|
|
|
|
//document.getElementById("wmtbURL").value="evX("+eventX+") elX("+elementX+") xO("+xOff+") y("+year+") m("+month+") monthOff("+monthOff+") DS("+dateString+") Moy("+monthOfYear+") ms("+monthString+")";
|
|
if(curYear != year) {
|
|
var yrOff = year * yearImgWidth;
|
|
document.getElementById("wbMouseTrackYearImg").style.left = yrOff + "px";
|
|
curYear = year;
|
|
}
|
|
if(curMonth != month) {
|
|
var mtOff = year + (month * monthImgWidth) + 1;
|
|
document.getElementById("wbMouseTrackMonthImg").style.left = mtOff + "px";
|
|
curMonth = month;
|
|
}
|
|
}
|
|
//]]>
|
|
</script>
|
|
|
|
<style type="text/css">body{margin-top:0!important;padding-top:0!important;min-width:800px!important;}#wm-ipp a:hover{text-decoration:underline!important;}</style>
|
|
<div id="wm-ipp" style="display:none; position:relative;padding:0 5px;min-height:70px;min-width:800px; z-index:9000;">
|
|
<div id="wm-ipp-inside" style="position:fixed;padding:0!important;margin:0!important;width:97%;min-width:780px;border:5px solid #000;border-top:none;background-image:url(http://staticweb.archive.org/images/toolbar/wm_tb_bk_trns.png);text-align:center;-moz-box-shadow:1px 1px 3px #333;-webkit-box-shadow:1px 1px 3px #333;box-shadow:1px 1px 3px #333;font-size:11px!important;font-family:'Lucida Grande','Arial',sans-serif!important;">
|
|
<table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr>
|
|
<td style="padding:10px;vertical-align:top;min-width:110px;">
|
|
<a href="http://wayback.archive.org/web/" title="Wayback Machine home page" style="background-color:transparent;border:none;"><img src="http://staticweb.archive.org/images/toolbar/wayback-toolbar-logo.png" alt="Wayback Machine" width="110" height="39" border="0"/></a>
|
|
</td>
|
|
<td style="padding:0!important;text-align:center;vertical-align:top;width:100%;">
|
|
|
|
<table style="border-collapse:collapse;margin:0 auto;padding:0;width:570px;"><tbody><tr>
|
|
<td style="padding:3px 0;" colspan="2">
|
|
<form target="_top" method="get" action="http://wayback.archive.org/web/form-submit.jsp" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="url" id="wmtbURL" value="http://sami.samhuri.net/articles/2006/07/19/late-static-binding" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;" onfocus="javascript:this.focus();this.select();" /><input type="hidden" name="type" value="replay" /><input type="hidden" name="date" value="20061018215014" /><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;" /><span id="wm_tb_options" style="display:block;"></span></form>
|
|
</td>
|
|
<td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
|
|
<table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
|
|
|
|
<!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
|
|
<tr style="width:110px;height:16px;font-size:10px!important;">
|
|
<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
|
|
|
|
Sep
|
|
|
|
</td>
|
|
<td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 21:50:14 Oct 18, 2006">OCT</td>
|
|
<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
|
|
|
|
<a href="http://web.archive.org/web/20070313163006/http://sami.samhuri.net/articles/2006/07/19/late-static-binding" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="13 Mar 2007"><strong>MAR</strong></a>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
|
|
<tr>
|
|
<td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
|
|
|
|
<img src="http://staticweb.archive.org/images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" />
|
|
|
|
</td>
|
|
<td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 21:50:14 Oct 18, 2006">18</td>
|
|
<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
|
|
|
|
<a href="http://web.archive.org/web/20070313163006/http://sami.samhuri.net/articles/2006/07/19/late-static-binding" title="16:30:06 Mar 13, 2007" style="background-color:transparent;border:none;"><img src="http://staticweb.archive.org/images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"/></a>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
|
|
<tr style="width:110px;height:13px;font-size:9px!important;">
|
|
<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
|
|
|
|
2005
|
|
|
|
</td>
|
|
<td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 21:50:14 Oct 18, 2006">2006</td>
|
|
<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
|
|
|
|
2007
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody></table>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align:middle;padding:0!important;">
|
|
<a href="http://wayback.archive.org/web/20061018215014*/http://sami.samhuri.net/articles/2006/07/19/late-static-binding" style="color:#33f;font-size:11px;font-weight:bold;background-color:transparent;border:none;" title="See a list of every capture for this URL"><strong>2 captures</strong></a>
|
|
<div style="margin:0!important;padding:0!important;color:#666;font-size:9px;padding-top:2px!important;white-space:nowrap;" title="Timespan for captures of this URL">18 Oct 06 - 13 Mar 07</div>
|
|
</td>
|
|
<td style="padding:0!important;">
|
|
<a style="position:relative; white-space:nowrap; width:400px;height:27px;" href="" id="wm-graph-anchor">
|
|
<div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:400px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
|
|
<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
|
|
onmouseover="showTrackers('inline');"
|
|
onmouseout="showTrackers('none');"
|
|
onmousemove="trackMouseMove(event,this)"
|
|
alt="sparklines"
|
|
width="400"
|
|
height="27"
|
|
border="0"
|
|
src="http://wayback.archive.org/jsp/graph.jsp?graphdata=400_27_1996:-1:000000000000_1997:-1:000000000000_1998:-1:000000000000_1999:-1:000000000000_2000:-1:000000000000_2001:-1:000000000000_2002:-1:000000000000_2003:-1:000000000000_2004:-1:000000000000_2005:-1:000000000000_2006:9:000000000100_2007:-1:001000000000_2008:-1:000000000000_2009:-1:000000000000_2010:-1:000000000000_2011:-1:000000000000"></img>
|
|
<img id="wbMouseTrackYearImg"
|
|
style="display:none; position:absolute; z-index:9010;"
|
|
width="25"
|
|
height="27"
|
|
border="0"
|
|
src="http://staticweb.archive.org/images/toolbar/transp-yellow-pixel.png"></img>
|
|
<img id="wbMouseTrackMonthImg"
|
|
style="display:none; position:absolute; z-index:9011; "
|
|
width="2"
|
|
height="27"
|
|
border="0"
|
|
src="http://staticweb.archive.org/images/toolbar/transp-red-pixel.png"></img>
|
|
</div>
|
|
</a>
|
|
|
|
</td>
|
|
</tr></tbody></table>
|
|
</td>
|
|
<td style="text-align:right;padding:5px;width:65px;font-size:11px!important;">
|
|
<a href="javascript:;" onclick="document.getElementById('wm-ipp').style.display='none';" style="display:block;padding-right:18px;background:url(http://staticweb.archive.org/images/toolbar/wm_tb_close.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;margin-bottom:23px;background-color:transparent;border:none;" title="Close the toolbar">Close</a>
|
|
<a href="http://faq.web.archive.org/" style="display:block;padding-right:18px;background:url(http://staticweb.archive.org/images/toolbar/wm_tb_help.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;background-color:transparent;border:none;" title="Get some help using the Wayback Machine">Help</a>
|
|
</td>
|
|
</tr></tbody></table>
|
|
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
var wmDisclaimBanner = document.getElementById("wm-ipp");
|
|
if(wmDisclaimBanner != null) {
|
|
disclaimElement(wmDisclaimBanner);
|
|
}
|
|
</script>
|
|
<!-- END WAYBACK TOOLBAR INSERT -->
|
|
|
|
|
|
<div id="content" class="clearfix">
|
|
|
|
<div id="main">
|
|
<!--
|
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
<rdf:Description
|
|
rdf:about=""
|
|
trackback:ping="http://sami.samhuri.net/articles/trackback/430"
|
|
dc:title="Late static binding"
|
|
dc:identifier="http://sami.samhuri.net/articles/read/430"
|
|
dc:description="Update: This has been discussed and will be uh, sort of fixed, in PHP6. You&#8217;ll be abl"
|
|
dc:creator="sjs"
|
|
dc:date="2006-09-19T19:20:46-07:00" />
|
|
</rdf:RDF>
|
|
-->
|
|
|
|
<div class="post" onmouseover="if (getCookie('is_admin') == 'yes') { Element.show('admin_article'); }" onmouseout="Element.hide('admin_article');" >
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/admin/content/edit/430" class="admintools" id="admin_article" style="display: none">edit</a>
|
|
<h2>Late static binding</h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Wed, 19 Jul 2006 17:23:00 GMT">Wed, 19 Jul 2006 17:23:00 GMT</span></p>
|
|
<p><em>Update: This has <a href="http://web.archive.org/web/20061018215014/http://www.php.net/~derick/meeting-notes.html#late-static-binding-using-this-without-or-perhaps-with-a-different-name">been discussed</a> and will be uh, sort of fixed, in <span class="caps">PHP6</span>. You’ll be able to use static::my_method() to get the real reference to self in class methods. Not optimal, but still a solution I guess.</em></p>
|
|
|
|
|
|
<p>As colder on ##php (freenode) told me today, class methods in <span class="caps">PHP</span> don’t have what they call late static binding. What’s that? It means that this code:</p>
|
|
|
|
|
|
<pre>
|
|
<code>
|
|
class Foo
|
|
{
|
|
public static function my_method()
|
|
{
|
|
echo "I'm a " . get_class() . "!\n";
|
|
}
|
|
}
|
|
|
|
class Bar extends Foo
|
|
{}
|
|
|
|
Bar::my_method();
|
|
</code>
|
|
</pre>
|
|
|
|
<p>outputs “I’m a Foo!”, instead of “I’m a Bar!”. That’s not fun.</p><p>Using <code>__CLASS__</code> in place of <code>get_class()</code> makes zero difference. You end up with proxy methods in each subclass of Foo that pass in the real name of the calling class, which sucks.</p>
|
|
|
|
|
|
<pre>
|
|
<code>
|
|
class Bar extends Foo
|
|
{
|
|
public static function my_method()
|
|
{
|
|
return parent::my_method( get_class() );
|
|
}
|
|
}
|
|
</code>
|
|
</pre>
|
|
|
|
<p>I was told that they had a discussion about this on the internal <span class="caps">PHP</span> list, so at least they’re thinking about this stuff. Too bad <span class="caps">PHP5</span> doesn’t have it. I guess I should just be glad I won’t be maintaining this code.</p>
|
|
|
|
|
|
<p>The resident <span class="caps">PHP</span> coder said “just make your code simpler”, which is what I was trying to do by removing duplication. Too bad that plan sort of backfired. I guess odd things like this are where <span class="caps">PHP</span> starts to show that OO was tacked on as an after-thought.</p>
|
|
</div>
|
|
<p class="meta">
|
|
Posted in <a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/php" rel="tag">php</a>, <a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/hacking" rel="tag">coding</a> <strong>|</strong> Tags <a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/tag/coding" rel="tag">coding</a>, <a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/tag/php" rel="tag">php</a> <strong>|</strong> <a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/07/19/late-static-binding#comments">2 comments</a> <strong>|</strong> <a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/07/19/late-static-binding#trackbacks">no trackbacks</a>
|
|
</p>
|
|
|
|
<a name="comments"></a><h4 class="blueblk">Comments</h4>
|
|
<p class="postmetadata alt">
|
|
<small><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/07/19/late-static-binding#respond">Leave a response</a></small>
|
|
</p>
|
|
<ol class="comment-list" id="commentList">
|
|
|
|
<li id="comment-432" onmouseover="if (getCookie('is_admin') == 'yes') { Element.show('admin_comment_432'); }" onmouseout="Element.hide('admin_comment_432');" >
|
|
<div id="admin_comment_432" style="display: none"><a class="admintools" href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/07/19/late-static-binding#" onclick="if (confirm('Are you sure you want to delete this comment?')) { new Ajax.Request('/articles/nuke_comment/432', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Puff('comment-432',{duration:0.6});}}); }; return false;">nuke</a><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/admin/comments/article/430/edit/432" class="admintools">edit</a></div>
|
|
<a name="comment-432"></a>
|
|
<img alt="Avatar" class="gravatar" src="http://web.archive.org/web/20061018215014im_/http://www.gravatar.com/avatar.php?gravatar_id=d41d8cd98f00b204e9800998ecf8427e&size=60" />
|
|
<cite><strong>Jim Roepcke</strong> </cite> said 25 days later:<br />
|
|
<p>That’s the worst of both worlds.</p>
|
|
|
|
|
|
<p>In Objective-C, that would work properly. In Java, it wouldn’t work at all because static methods (Java doesn’t have class methods) aren’t inherited by subclasses, so at least if you called the method on the superclass the result would be consistent…. but this, this crap (as <span class='caps'>PHP</span> always is), well, it isn’t consistent with anything. Doesn’t get any worse. But, I’m hardly surprised.</p>
|
|
</li><li id="comment-434" class="author_comment" onmouseover="if (getCookie('is_admin') == 'yes') { Element.show('admin_comment_434'); }" onmouseout="Element.hide('admin_comment_434');" >
|
|
<div id="admin_comment_434" style="display: none"><a class="admintools" href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/07/19/late-static-binding#" onclick="if (confirm('Are you sure you want to delete this comment?')) { new Ajax.Request('/articles/nuke_comment/434', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Puff('comment-434',{duration:0.6});}}); }; return false;">nuke</a><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/admin/comments/article/430/edit/434" class="admintools">edit</a></div>
|
|
<a name="comment-434"></a>
|
|
<img alt="Avatar" class="gravatar" src="http://web.archive.org/web/20061018215014im_/http://www.gravatar.com/avatar.php?gravatar_id=d41d8cd98f00b204e9800998ecf8427e&size=60" />
|
|
<cite><strong>Sami</strong> </cite> said 34 days later:<br />
|
|
<p>Interesting about Java, I didn’t know static methods weren’t inherited.</p>
|
|
|
|
|
|
<p>I have to say that I don’t know if I can work another job using <span class='caps'>PHP</span> and keep my sanity. :)</p>
|
|
</li>
|
|
|
|
</ol>
|
|
|
|
<a name="trackbacks"></a><h4 class="blueblk">Trackbacks</h4>
|
|
<p>
|
|
Use the following link to trackback from your own site:<br/>
|
|
<span class="light-bg">http://sami.samhuri.net/articles/trackback/430</span>
|
|
</p>
|
|
|
|
|
|
<p class="postmetadata alt">
|
|
<small>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/xml/rss20/article/430/feed.xml" title="RSS Feed">RSS feed for this post</a>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/trackback/430" >trackback uri</a>
|
|
</small>
|
|
</p>
|
|
|
|
<form action="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/comment/430" class="commentform" id="commentform" method="post" onsubmit="new Ajax.Updater({success:'commentList'}, '/articles/comment/430', {asynchronous:true, evalScripts:true, insertion:Insertion.Bottom, onComplete:function(request){complete(request)}, onFailure:function(request){failure(request)}, onLoading:function(request){loading()}, parameters:Form.serialize(this)}); return false;">
|
|
|
|
|
|
<div class="comment-box">
|
|
<div id="errors"></div>
|
|
<div id="preview" style="display: none"></div>
|
|
|
|
<a name="respond"></a>
|
|
<table cellpadding="4" cellspacing="0" class="frm-tbl">
|
|
<tr>
|
|
<td><p><label for="comment_author">Your name</label></p></td>
|
|
<td> <input id="comment_author" name="comment[author]" size="20" type="text" /> <small><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/07/19/late-static-binding#" onclick="Element.toggle('guest_url'); Element.toggle('guest_email'); return false;">(leave url/email »)</a></small></td>
|
|
</tr>
|
|
<tr id="guest_url" style="display:none;">
|
|
<td><p><label for="comment_url">Your blog</label></p></td>
|
|
<td> <input id="comment_url" name="comment[url]" size="30" type="text" /></td>
|
|
</tr>
|
|
<tr id="guest_email" style="display:none;">
|
|
<td><p><label for="comment_email">Your email</label></p></td>
|
|
<td> <input id="comment_email" name="comment[email]" size="30" type="text" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><label for="comment_body">Your message</label></p></td>
|
|
<td valign="top" colspan="2">
|
|
<textarea cols="40" id="comment_body" name="comment[body]" rows="20"></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" id="frm-btns">
|
|
<span id="comment_loading" style="display:none;"><img alt="Spinner" src="http://web.archive.org/web/20061018215014im_/http://sami.samhuri.net/images/spinner.gif" /></span>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/07/19/late-static-binding#" onclick="new Ajax.Updater('preview', '/articles/comment_preview', {asynchronous:true, evalScripts:true, parameters:Form.serialize('commentform'), onComplete:function(request){Element.show('preview')}}); return false;">Preview comment</a>
|
|
<input type="submit" name="submit" id="form-submit-button" value="submit" class="button" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
show_dates_as_local_time()
|
|
//]]>
|
|
</script>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="leftcolumn">
|
|
<div id="header">
|
|
<h1 id="sitename"><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/">sjs</a></h1>
|
|
<h2 id="subtitle"> </h2>
|
|
</div>
|
|
|
|
<div id="sidebar">
|
|
<div id="search"><form action="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/search" id="sform" method="get">
|
|
<label for="q">Search: </label><input type="text" id="q" name="q" value="" size="15" />
|
|
<img alt="Spinner-blue" id="search_spinner" src="http://web.archive.org/web/20061018215014im_/http://sami.samhuri.net/images/spinner-blue.gif" style="display:none;" />
|
|
</form>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
new Form.Element.Observer('q', 1, function(element, value) {new Ajax.Updater('search-results', '/live/search', {asynchronous:true, evalScripts:true, onComplete:function(request){Element.hide('search_spinner')}, onLoading:function(request){Element.show('search_spinner')}, parameters:'q=' + escape($F('q'))})})
|
|
//]]>
|
|
</script></div>
|
|
<div id="search-results"></div>
|
|
|
|
|
|
|
|
<div class="sidebar-node">
|
|
<h3>All about...</h3>
|
|
<ul>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/pages/about">a bit about me</a></li>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/pages/thunder">workstation</a></li>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-node">
|
|
<h3>Categories</h3>
|
|
<ul id="categories">
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/amusement">amusement</a> <em>(5)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/gentoo">gentoo</a> <em>(1)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/hacking">coding</a> <em>(16)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/life">life</a> <em>(5)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/linux">linux</a> <em>(2)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/mac-os-x">mac os x</a> <em>(6)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/python">python</a> <em>(1)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/rails">rails</a> <em>(12)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/ruby">ruby</a> <em>(1)</em></li>
|
|
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/technology">technology</a> <em>(5)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/textmate">textmate</a> <em>(10)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/apple">apple</a> <em>(6)</em></li>
|
|
|
|
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/category/php">php</a> <em>(4)</em></li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-node">
|
|
|
|
<h3>Archives</h3>
|
|
<ul id="archives">
|
|
|
|
<li>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/09">September 2006</a>
|
|
<em>(2)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/08">August 2006</a>
|
|
<em>(1)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/07">July 2006</a>
|
|
<em>(5)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/06">June 2006</a>
|
|
<em>(4)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/05">May 2006</a>
|
|
<em>(2)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/04">April 2006</a>
|
|
<em>(1)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/03">March 2006</a>
|
|
<em>(4)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/articles/2006/02">February 2006</a>
|
|
<em>(15)</em>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-node">
|
|
<h3>Links</h3>
|
|
<ul>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://phox.ca/cswiki/Main_Page">CSWiki</a></li>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://jim.roepcke.com/">Have Browser, Will Travel</a></li>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://blog.inquirylabs.com/">Going Up</a></li>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://www.mirage.org/">encieno</a></li>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://www.nofxwiki.net/">nofxwiki.net</a></li>
|
|
<li>sami at samhuri dot net</li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-node">
|
|
<p><ul>
|
|
<li><a class="feed" href="http://web.archive.org/web/20061018215014/http://sami.samhuri.net/xml/rss20/feed.xml" title="Articles feed"><img src="http://web.archive.org/web/20061018215014im_/http://sami.samhuri.net/files/feed-icon-48x48.png" alt="RSS 2.0" width="48" height="48" /></a></li>
|
|
|
|
<!--
|
|
|
|
-->
|
|
|
|
</ul></p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<br clear="all" />
|
|
</div>
|
|
</div>
|
|
|
|
<div id="footer">
|
|
<ul>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://typo.leetsoft.com/">Typo</a></li>
|
|
<li>•</li>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://validator.w3.org/check?uri=referer">Valid XHTML</a></li>
|
|
<li>•</li>
|
|
<li><a href="http://web.archive.org/web/20061018215014/http://jigsaw.w3.org/css-validator/validator?uri=http://sami.samhuri.net/">Valid CSS</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<script src="http://web.archive.org/web/20061018215014js_/http://www.google-analytics.com/urchin.js" type="text/javascript">
|
|
</script>
|
|
<script type="text/javascript">
|
|
_uacct = "UA-214054-3";
|
|
urchinTracker();
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
FILE ARCHIVED ON 21:50:14 Oct 18, 2006 AND RETRIEVED FROM THE
|
|
INTERNET ARCHIVE ON 7:31:10 Dec 11, 2011.
|
|
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
|
|
|
|
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
|
|
SECTION 108(a)(3)).
|
|
-->
|