3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $states = [ 'AL'=>'ALABAMA', 'AK'=>'ALASKA', 'AS'=>'AMERICAN SAMOA', 'AZ'=>'ARIZONA', 'AR'=>'ARKANSAS', 'CA'=>'CALIFORNIA', 'CO'=>'COLORADO', 'CT'=>'CONNECTICUT', 'DE'=>'DELAWARE', 'DC'=>'DISTRICT OF COLUMBIA', 'FM'=>'FEDERATED STATES OF MICRONESIA', 'FL'=>'FLORIDA', 'GA'=>'GEORGIA', 'GU'=>'GUAM GU', 'HI'=>'HAWAII', 'ID'=>'IDAHO', 'IL'=>'ILLINOIS', 'IN'=>'INDIANA', 'IA'=>'IOWA', 'KS'=>'KANSAS', 'KY'=>'KENTUCKY', 'LA'=>'LOUISIANA', 'ME'=>'MAINE', 'MH'=>'MARSHALL ISLANDS', 'MD'=>'MARYLAND', 'MA'=>'MASSACHUSETTS', 'MI'=>'MICHIGAN', 'MN'=>'MINNESOTA', 'MS'=>'MISSISSIPPI', 'MO'=>'MISSOURI', 'MT'=>'MONTANA', 'NE'=>'NEBRASKA', 'NV'=>'NEVADA', 'NH'=>'NEW HAMPSHIRE', 'NJ'=>'NEW JERSEY', 'NM'=>'NEW MEXICO', 'NY'=>'NEW YORK', 'NC'=>'NORTH CAROLINA', 'ND'=>'NORTH DAKOTA', 'MP'=>'NORTHERN MARIANA ISLANDS', 'OH'=>'OHIO', 'OK'=>'OKLAHOMA', 'OR'=>'OREGON', 'PW'=>'PALAU', 'PA'=>'PENNSYLVANIA', 'PR'=>'PUERTO RICO', 'RI'=>'RHODE ISLAND', 'SC'=>'SOUTH CAROLINA', 'SD'=>'SOUTH DAKOTA', 'TN'=>'TENNESSEE', 'TX'=>'TEXAS', 'UT'=>'UTAH', 'VT'=>'VERMONT', 'VI'=>'VIRGIN ISLANDS', 'VA'=>'VIRGINIA', 'WA'=>'WASHINGTON', 'WV'=>'WEST VIRGINIA', 'WI'=>'WISCONSIN', 'WY'=>'WYOMING', 'AE'=>'ARMED FORCES AFRICA \ CANADA \ EUROPE \ MIDDLE EAST', 'AA'=>'ARMED FORCES AMERICA (EXCEPT CANADA)', 'AP'=>'ARMED FORCES PACIFIC' ]; foreach ($states as $key => $value) { echo $key.'='.$value; }
based on fYeZL
Output for 5.4.0 - 7.2.0
AL=ALABAMAAK=ALASKAAS=AMERICAN SAMOAAZ=ARIZONAAR=ARKANSASCA=CALIFORNIACO=COLORADOCT=CONNECTICUTDE=DELAWAREDC=DISTRICT OF COLUMBIAFM=FEDERATED STATES OF MICRONESIAFL=FLORIDAGA=GEORGIAGU=GUAM GUHI=HAWAIIID=IDAHOIL=ILLINOISIN=INDIANAIA=IOWAKS=KANSASKY=KENTUCKYLA=LOUISIANAME=MAINEMH=MARSHALL ISLANDSMD=MARYLANDMA=MASSACHUSETTSMI=MICHIGANMN=MINNESOTAMS=MISSISSIPPIMO=MISSOURIMT=MONTANANE=NEBRASKANV=NEVADANH=NEW HAMPSHIRENJ=NEW JERSEYNM=NEW MEXICONY=NEW YORKNC=NORTH CAROLINAND=NORTH DAKOTAMP=NORTHERN MARIANA ISLANDSOH=OHIOOK=OKLAHOMAOR=OREGONPW=PALAUPA=PENNSYLVANIAPR=PUERTO RICORI=RHODE ISLANDSC=SOUTH CAROLINASD=SOUTH DAKOTATN=TENNESSEETX=TEXASUT=UTAHVT=VERMONTVI=VIRGIN ISLANDSVA=VIRGINIAWA=WASHINGTONWV=WEST VIRGINIAWI=WISCONSINWY=WYOMINGAE=ARMED FORCES AFRICA \ CANADA \ EUROPE \ MIDDLE EASTAA=ARMED FORCES AMERICA (EXCEPT CANADA)AP=ARMED FORCES PACIFIC
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/rlatX on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/rlatX on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/rlatX on line 3
Process exited with code 255.