Archive: Namaste PHP AMQP framework v1.0 (2017-2020)
952 days continuous production uptime, 40k+ tp/s single node. Original corpo Bitbucket history not included — clean archive commit.
This commit is contained in:
21
stubs/arrayDiff.php
Normal file
21
stubs/arrayDiff.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
$array1 = [ 'color' => 'red', 'size' => 'XL', 'style' => 'gothic', 'brand' => 'levi', 'token' => 1 ];
|
||||
|
||||
|
||||
$array2 = [ 'color' => 1, 'brand' => 1 ];
|
||||
|
||||
$array3 = array_diff_key($array1, $array2);
|
||||
|
||||
$array4 = ['token' => mt_rand(0, 10), 'color' => 'red', 'size' => 'xl'];
|
||||
|
||||
$array5 = [ 'token' => 1 ];
|
||||
echo PHP_EOL;
|
||||
if (empty($array3))
|
||||
echo "no results returned";
|
||||
else
|
||||
var_export($array3);
|
||||
echo PHP_EOL;
|
||||
|
||||
$array4 = array_intersect_key($array1, $array5);
|
||||
var_export($array4);
|
||||
Reference in New Issue
Block a user