Weitere ähnliche Inhalte Ähnlich wie Does the SPL still have any relevance in the Brave New World of PHP7? (20) Kürzlich hochgeladen (20) Does the SPL still have any relevance in the Brave New World of PHP7?1. Does the SPL still have any relevance
in the Brave New World of PHP7?
2. Standard PHP Library
Since PHP 5.3.0
Provides
• DataTypes
• Autoloader
• Interfaces
• Iterators
• Exceptions
• DataStructures
• File Handling
• Miscellaneous Functions
18. Iterators
Iterators Generators
• Less Userland Code
• Core Iterators are already Tested
• Potentially Slower
• Potentially less memory efficient
• More Userland Code
• Requires Userland Testing
• No Rewind
• Can’t be Extended
31. Data Structures
Rudi Theunissen’s new PHP7 Datastructures
PECL Extension
Github
https://github.com/php-ds
PHP Documentation
http://php.net/manual/en/book.ds.php
Blog
https://medium.com/@rtheunissen/efficient-data-structures-for-php-7-9dda7af674cd
32. Rudi’s Data Structures
• Stack
• Queue
• Priority Queue
• Sequence (List)
• Vector
• Deque (Double-Ended Queue)
• Map
• Set
41. Standard PHP Library
Provides
• DataTypes
• Autoloader
• Interfaces ?
• Iterators ?
• Exceptions
• DataStructures ?
• File Handling
• Miscellaneous Functions ?