Miscellaneous, personal stories.
yes, I'm still doing the tutorial. : ) Did you know ...? PHP Code: <?php class alphaHeap extends SplHeap{ public function compare( $a,$b ){ return strcmp( $b,$a ); } } $alpha = new alphaHeap; # IN put: $alpha->insert( 'cat' ); // C $alpha->insert( 'dog' ); // D $alpha->insert( 'boy' ); // B $alpha->insert( 'elephant' ); // E ...
<?php class alphaHeap extends SplHeap{ public function compare( $a,$b ){ return strcmp( $b,$a ); } } $alpha = new alphaHeap; # IN put: $alpha->insert( 'cat' ); // C $alpha->insert( 'dog' ); // D $alpha->insert( 'boy' ); // B $alpha->insert( 'elephant' ); // E
Updated 12-23-2012 at 09:09 PM by traq
Yes, the tutorial is still coming. It's big. It's in progress. I read this recently and was intrigued. Don't know if anyone else would care or not ... The author, nikic, does a great job summarizing the difficulties and potential benefits of type hinting, as well as giving a good explanation as to why PHP's implementation is incomplete. Personally, I look forward to being able to type-hint any type. It could save me a lot of code validating args, and I could ...
Updated 12-01-2012 at 04:48 AM by traq