Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5999191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:31:03+00:00 2026-05-23T00:31:03+00:00

Is there a: 1> Vector(Java) class 2> ListIterator 3> Single Linkedlist equivalent available in

  • 0

Is there a:

1> Vector(Java) class
2> ListIterator
3> Single Linkedlist

equivalent available in PHP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:31:04+00:00Added an answer on May 23, 2026 at 12:31 am

    1) Any PHP array can be considered and used as a Vector (since by definition Vector is just an array that can grow in size and PHP doesn’t require to specify array size). As java documents it,

    public class Vector 
    extends AbstractList
    implements List, RandomAccess, Cloneable, Serializable
    

    PHP array fulfills all there requirements.

    2) There is an Iterator if you insist on it, but in general it is much more common to use loops for array traversing (just like you don’t really iterate arrays in Java with Iterator, do you?)

    3) There is no list implementations in PHP in general (well, I bet internally arrays are implemented as a list/hashmap, but that’s only internally). You can go with one of two options. Either use array (do you see a pattern here – arrays FTW!) if you are only interested in sequential ordering of items (you get random access as a bonus), or you can implement your own completely-OO list with 2 small classes (I’d call them List and ListCell)

    Addition to part 3: Don’t worry about insertions or deletions in the middle of the list, as those may be achieved with array_slice and array_splice. Insertion and deletion may not be O(1) timewise, but since in the list you would also need O(n) time for locating the place to insert in the list, I thing the options are comparable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an expandable array class in the Java API equivalent to the Vector
I Know there's a Vector class in java, but it seems to be just
Which of the methods of java Vector class is synchronized.Since there is no explicit
this is the code: import java.awt.*; import java.awt.event.*; import java.applet.*; import java.util.Vector; public class
In my Java project, I have a vector of various types of Traders. These
Is there a way to resize a std::vector to lower capacity when I no
Is there a way to convert a vector to a pointer to a pointer
Is there a way to extend a vector by making it repeat itself? >v
Is there really that much of a difference between the performance of Vector and
Is there a way to make OpenGL transform a general vector I give it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.