3v4l.org

run code in 200+ PHP versions simultaneously
<?php $array = array ( 'AddRooms' => '', 'AvailUtil' => 'City Water,Municipal / Public', 'CommonFacilities' => '', 'CommunityAmenities' => '', 'Construct' => 'Poured In Place Foundation,Pre-stressed Concrete,Steel & Concrete', 'Garage' => '1 Car Garage', 'Heating' => 'Radiant', 'Laundry' => '', 'Location' => '', 'ParkingDescription' => '1 Car Garage', 'PrkType' => '1 Car Garage', 'PropertySubType' => 'Residential', 'ResidentFeatures' => '', 'SFSource' => 'County/Gov\'t', 'Appliances' => 'Dishwasher,ElectricRange,Disposal,Microwave,Refrigerator,SomeElectricAppliances,Dryer,Washer', 'Area' => 'Wildernest/Silverthorne', 'AssocFee' => 580.0, 'AssocFeeIncl' => 'CommonAreas,CableTV,Gas,HVAC,Insurance,Sewer,SnowRemoval,Trash,Water', 'AssocFreq' => 'Monthly', 'BathsFull' => 2, 'BathsTotal' => 2, 'BedsTotal' => 2, 'City' => 'SILVERTHORNE', 'CloseDate' => '2019-05-16', 'ClosePrice' => 520000.0, 'ComplexSubdiv' => 'RETREAT ON THE BLUE CONDO', 'CountyOrParish' => 'Summit', 'CurrentTaxAmount' => 1315.0, 'CurrentTaxYear' => 2017, 'DrivingDirections' => 'In Silverthorne, North on Blue River Parkway, go right into Retreat on the Blue Sub, across from Subaru Dealer, and follow back to north end unit, building D. Condo is on top level.', 'EconomicArea' => 'Silverthorne/Dillon', 'FloorCvr' => 'Carpet,Tile', 'Furnish' => 'Partially', 'Latitude' => 39.63991, 'LegalDesc' => 'UNIT D2 RETREAT ON THE BL', 'ListAgentDirectWorkPhone' => '(970) 389-2996', 'ListAgentEmail' => 'jackie@buysummitcounty.com', 'ListAgentFullName' => 'Jackie McPheeters', 'ListAgentMLSID' => '0199009', 'ListingContractDate' => '2019-02-25', 'ListOfficeMLSID' => '1606', 'ListOfficeName' => 'Colorado Homes Real Estate Co.', 'ListOfficePhone' => '(970) 389-2996', 'ListPrice' => 555000.0, 'LivAreaSF' => 1155.0, 'Longitude' => -106.075366, 'Matrix_Unique_ID' => '6099266', 'MatrixModifiedDT' => '2020-01-04T00:57:15.177-00:00', 'MLSNumber' => 'S1012315', 'NumLevelsinUnit' => 'One', 'OriginalEntryTimestamp' => '2019-02-25T18:40:13.437-00:00', 'ParcelNumber' => '6511099', 'PendingDate' => '2019-03-22T00:00:00.000-00:00', 'PetsAllowed' => 'OwnerOnly,PetRestrictions', 'Possession' => 'DeliveryOfDeed', 'PostalCode' => '80498', 'PropertyType' => 'Condominium', 'PublicRemarks' => 'Rare 2 bed, 2 bath, Top Floor end unit on the Blue River! This home is a wonderful place to call home in the mountains. It\'s in a quiet, serene setting, overlooking the Blue River. Move in ready for Buyer\'s convenience. Well kept with nice furniture and great for an investment property. 1 car garage. Short-term renting allowed.', 'Roof' => 'Asphalt', 'Sewer' => 'Connected', 'StateOrProvince' => 'CO', 'Status' => 'Closed', 'StreetName' => 'Blue River', 'StreetNumber' => '848', 'UnitEntryLev' => 2, 'UnitNumber' => 'D2', 'View' => 'Mountains,River,CreekStream', 'WtrSource' => 'Public', 'YearBuilt' => 2002, 'ZoningCode' => 'Planned Unit Development', 'Zztop' => '0', 'Zzbottom' => 0 ); $func = function($var){ return $var !== ''; }; $filtered = array_filter($array, $func); var_dump($filtered);
based on An4dP
Output for 7.2.0 - 7.4.1
array(66) { ["AvailUtil"]=> string(29) "City Water,Municipal / Public" ["Construct"]=> string(65) "Poured In Place Foundation,Pre-stressed Concrete,Steel & Concrete" ["Garage"]=> string(12) "1 Car Garage" ["Heating"]=> string(7) "Radiant" ["ParkingDescription"]=> string(12) "1 Car Garage" ["PrkType"]=> string(12) "1 Car Garage" ["PropertySubType"]=> string(11) "Residential" ["SFSource"]=> string(12) "County/Gov't" ["Appliances"]=> string(92) "Dishwasher,ElectricRange,Disposal,Microwave,Refrigerator,SomeElectricAppliances,Dryer,Washer" ["Area"]=> string(23) "Wildernest/Silverthorne" ["AssocFee"]=> float(580) ["AssocFeeIncl"]=> string(68) "CommonAreas,CableTV,Gas,HVAC,Insurance,Sewer,SnowRemoval,Trash,Water" ["AssocFreq"]=> string(7) "Monthly" ["BathsFull"]=> int(2) ["BathsTotal"]=> int(2) ["BedsTotal"]=> int(2) ["City"]=> string(12) "SILVERTHORNE" ["CloseDate"]=> string(10) "2019-05-16" ["ClosePrice"]=> float(520000) ["ComplexSubdiv"]=> string(25) "RETREAT ON THE BLUE CONDO" ["CountyOrParish"]=> string(6) "Summit" ["CurrentTaxAmount"]=> float(1315) ["CurrentTaxYear"]=> int(2017) ["DrivingDirections"]=> string(181) "In Silverthorne, North on Blue River Parkway, go right into Retreat on the Blue Sub, across from Subaru Dealer, and follow back to north end unit, building D. Condo is on top level." ["EconomicArea"]=> string(19) "Silverthorne/Dillon" ["FloorCvr"]=> string(11) "Carpet,Tile" ["Furnish"]=> string(9) "Partially" ["Latitude"]=> float(39.63991) ["LegalDesc"]=> string(25) "UNIT D2 RETREAT ON THE BL" ["ListAgentDirectWorkPhone"]=> string(14) "(970) 389-2996" ["ListAgentEmail"]=> string(26) "jackie@buysummitcounty.com" ["ListAgentFullName"]=> string(17) "Jackie McPheeters" ["ListAgentMLSID"]=> string(7) "0199009" ["ListingContractDate"]=> string(10) "2019-02-25" ["ListOfficeMLSID"]=> string(4) "1606" ["ListOfficeName"]=> string(30) "Colorado Homes Real Estate Co." ["ListOfficePhone"]=> string(14) "(970) 389-2996" ["ListPrice"]=> float(555000) ["LivAreaSF"]=> float(1155) ["Longitude"]=> float(-106.075366) ["Matrix_Unique_ID"]=> string(7) "6099266" ["MatrixModifiedDT"]=> string(29) "2020-01-04T00:57:15.177-00:00" ["MLSNumber"]=> string(8) "S1012315" ["NumLevelsinUnit"]=> string(3) "One" ["OriginalEntryTimestamp"]=> string(29) "2019-02-25T18:40:13.437-00:00" ["ParcelNumber"]=> string(7) "6511099" ["PendingDate"]=> string(29) "2019-03-22T00:00:00.000-00:00" ["PetsAllowed"]=> string(25) "OwnerOnly,PetRestrictions" ["Possession"]=> string(14) "DeliveryOfDeed" ["PostalCode"]=> string(5) "80498" ["PropertyType"]=> string(11) "Condominium" ["PublicRemarks"]=> string(330) "Rare 2 bed, 2 bath, Top Floor end unit on the Blue River! This home is a wonderful place to call home in the mountains. It's in a quiet, serene setting, overlooking the Blue River. Move in ready for Buyer's convenience. Well kept with nice furniture and great for an investment property. 1 car garage. Short-term renting allowed." ["Roof"]=> string(7) "Asphalt" ["Sewer"]=> string(9) "Connected" ["StateOrProvince"]=> string(2) "CO" ["Status"]=> string(6) "Closed" ["StreetName"]=> string(10) "Blue River" ["StreetNumber"]=> string(3) "848" ["UnitEntryLev"]=> int(2) ["UnitNumber"]=> string(2) "D2" ["View"]=> string(27) "Mountains,River,CreekStream" ["WtrSource"]=> string(6) "Public" ["YearBuilt"]=> int(2002) ["ZoningCode"]=> string(24) "Planned Unit Development" ["Zztop"]=> string(1) "0" ["Zzbottom"]=> int(0) }