php-var-sizeof
Function for getting size of any PHP variable in bytes (by mrsuh)
php-generics
PHP generics written in PHP (by mrsuh)
php-var-sizeof | php-generics | |
---|---|---|
3 | 7 | |
56 | 205 | |
- | - | |
0.0 | 3.9 | |
over 1 year ago | 29 days ago | |
PHP | PHP | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
php-var-sizeof
Posts with mentions or reviews of php-var-sizeof.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-03-22.
-
Comparing PHP Collections
Memory test is very simple. It creates $collection and puts Item objects into it count times. For measurement I use var_sizeof() and memory_get_usage().
-
I made my own var_sizeof() function with FFI to calculate variable size more accurate
I used this scrip to render a table with numbers https://github.com/mrsuh/php-var-sizeof/blob/master/bin/render-table.php
php-generics
Posts with mentions or reviews of php-generics.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-03.
-
How come there is no such thing as an equivalent to TypeScript in PHP?
Hi. I'm the author of the library which brings generics into PHP like TypeScript https://github.com/mrsuh/php-generics. Libraries like this have a few big problems to start using them freely:
-
Parsing with PHP, Bison and re2c
I used this knowledge to create the PHP generics library.
-
Comparing PHP Collections
Hi! I don't think so. Is used this library to translate generics syntax into regular PHP syntax. It's not equal to real PHP generics (like Hack did). IDE doesn't support PHP generic syntax yet. You can read about it here.
If you are only using simple collections you can use array - it is very fast and requires little memory. PHP doesn't support generic syntax and IDE can't make hints about the type of objects in a collection (yet), but if you want PHP to do type checks at runtime you can test the php-generics library.
-
PHP type erasure generics
A few months ago I created a PHP generics library with monomorphic generics. Today I released version 1.2.0 with type erase generics.
-
Generics implementation approaches
This approach has a big memory effect. PHP doesn't support native generics, but you can test monomorphized generics with my library.
-
PHP Generics. Right here. Right now
} ``` Library: https://github.com/mrsuh/php-generics Example repo: https://github.com/mrsuh/php-generics-example Have a nice day!
What are some alternatives?
When comparing php-var-sizeof and php-generics you can also consider the following projects:
PHPBench - PHP Benchmarking framework
php-generics-rfc - Mirror of https://wiki.php.net/rfc/generics for easier collaboration
shim - Shim version of PHP CS Fixer
php-collections-comparison - https://dev.to/mrsuh/comparing-php-collections-5cca
ruby - The Ruby Programming Language
php-generics-example
phel-lang - Phel is a functional programming language that transpiles to PHP. A Lisp dialect inspired by Clojure and Janet.
PHP Parser - A PHP parser written in PHP
PHPT - The PHP Interpreter
PhpGenerics - Here be dragons
PHPStan - PHP Static Analysis Tool - discover bugs in your code without running it!
php-var-sizeof vs PHPBench
php-generics vs php-generics-rfc
php-generics vs shim
php-generics vs php-collections-comparison
php-generics vs ruby
php-generics vs php-generics-example
php-generics vs phel-lang
php-generics vs PHP Parser
php-generics vs PHPT
php-generics vs PhpGenerics
php-generics vs PHPStan