Skip to content

Instantly share code, notes, and snippets.

View yuriybabenko's full-sized avatar

Yuriy Babenko yuriybabenko

View GitHub Profile
@yuriybabenko
yuriybabenko / flattenArray.php
Created March 5, 2019 03:13
Flatten array example
<?php
$foo = [5,7,8,2,[6,1,3,4],523,0.52,'foo',new DateTime,[123,[52, [0], -50], [9]]];
/**
* Returns a flat array of input integer values. Non-integer values filtered out.
*
* @param array $input Arbitrarily nested array of integers.
* @return array
*/

Keybase proof

I hereby claim:

  • I am yuriybabenko on github.
  • I am yuriyb (https://keybase.io/yuriyb) on keybase.
  • I have a public key ASDB1I_vPgdJjvoGALR8cjCgS5g6-uGch4VUyAd-rvDhDAo

To claim this, I am signing this object: