note 66132 added to function.array-push

From: Date: Mon, 15 May 2006 16:18:01 +0000
Subject: note 66132 added to function.array-push
Groups: php.notes 
Request: Send a blank email to php-notes+get-111328@lists.php.net to get a copy of this message
A small and basic implementation of a stack without using an array. class node { var $elem; var $next; } class stack { var $next; function pop() { $aux=$this->next->elem; $this->next=$this->next->next; return $aux; } function push($obj) { $nod=new node; $nod->elem=$obj; $nod->next=$this->next; $this->next=$nod; } function stack() { $this->next=NULL; } } ---- Server IP: 130.206.1.5 Probable Submitter: 62.57.228.114 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.array-push.php Edit -- http://master.php.net/note/edit/66132 Del: integrated -- http://master.php.net/note/delete/66132/integrated Del: useless -- http://master.php.net/note/delete/66132/useless Del: bad code -- http://master.php.net/note/delete/66132/bad+code Del: spam -- http://master.php.net/note/delete/66132/spam Del: non-english -- http://master.php.net/note/delete/66132/non-english Del: in docs -- http://master.php.net/note/delete/66132/in+docs Del: other reasons-- http://master.php.net/note/delete/66132 Reject -- http://master.php.net/note/reject/66132 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111328) next »