TechniqueHere is a list of all the Perl-related array manipulation features, as well as (in the "Discussion" section) a list of incompatibilities with their Perl counterparts.
CommentsThere are some incompatibilities between certain functions; for example, between Perl's push() function and PHP's array_push() function. This is more of a general incompatibility . In Perl, arrays specified in list context are automatically flattened, so push (@list1, @list2); would combine the two arrays ”the same thing that array_merge() would do in PHP. However, with array_push() this example would create a two-dimensional array because PHP does not automatically flatten its arrays. |