pozycjonowanie
Dodawarka do katalogów
katalogowanie
Pierwsza wersja PHP, rozpowszechniana pod nazwą PHP/FI Personal Home Page Forms Interpreter, została stworzona przez Rasmusa Lerdorfa w roku 1994 jako zestaw skryptów Perla służący do monitorowania internautów odwiedzających jego witrynę. Gdy ruch stał się zbyt duży, przepisał je w języku C, dodając przy tym nowe opcje. Niedługo później ludzie zaczęli prosić go o możliwość użycia tych narzędzi na swoich stronach, zatem 8 czerwca 1995 roku autor udostępnił publicznie kod źródłowy PHP Tools 1.0.
|
|
|
|
|
|
Elementy programowania obiektowego pojawiły się już w PHP 3 lecz nie pozwalały one rozwinąć skrzydeł programistom. Brakowało wielu istotnych elementów a kod nie był zoptymalizowany. Sytuacja całkowicie uległa zmianie w PHP 5 dodano wiele istotnych rzeczy m.in. interfejsy, kontrolę dostępu czy klasy abstrakcyjne. Model OOP wzorowany jest na językach C++ i Java.
(PHP 5 >= 5.1.0RC1)
array_intersect_key -- Computes the intersection of arrays using keys for comparisonarray_intersect_key() returns an array containing all the values of array1 which have matching keys that are present in all the arguments.
In our example you see that only the keys 'blue' and 'green' are present in both arrays and thus returned. Also notice that the values for the keys 'blue' and 'green' differ between the two arrays. A match still occurs because only the keys are checked. The values returned are those of array1.
The two keys from the key => value pairs are considered equal only if (string) $key1 === (string) $key2 . In other words a strict type check is executed so the string representation must be the same.
See also array_diff(), array_udiff() array_diff_assoc(), array_diff_uassoc(), array_udiff_assoc(), array_udiff_uassoc(), array_diff_key(), array_diff_ukey(), array_intersect(), array_intersect_assoc(), array_intersect_uassoc() and array_intersect_ukey().
| Poprzedni | Spis treści | Następny |
| array_intersect_assoc | Początek rozdziału | array_intersect_uassoc |