Example #1
0
 /**
  * @covers \Sarciszewski\PHPFuture\Utilty::arrayColumn()
  */
 public function testArrayColumn()
 {
     $x = [['a' => 1, 'b' => 1], ['a' => 2, 'b' => 3], ['a' => 3, 'b' => 2]];
     $y = [1 => 1, 2 => 3, 3 => 2];
     $this->assertEquals($y, Future\Utility::arrayColumn($x, 'b', 'a'));
 }
Example #2
0
 /**
  * From PHP 5.4
  *
  * @ref https://php.net/hex2bin
  *
  * @param string $data
  *
  * @return string
  */
 function hex2bin($data)
 {
     return Future\Utility::hexToBin($data);
 }