3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encode_string_array ($stringArray) { $s = strtr(base64_encode(addslashes(gzcompress(serialize($stringArray),9))), '+/=', '-_,'); return $s; } function decode_string_array ($stringArray) { $s = unserialize(gzuncompress(stripslashes(base64_decode(strtr($stringArray, '-_,', '+/='))))); return $s; } $string = '{ "head": [ { "FormId": "FR100400061", "CatchDate": "2016-01-25T12:17:57", "TravelerId": "80222557", "TravelerName": "El gio gonzales", "Status": 1, "CustAccount": "1004", "CustName": "Court de Tennis", "Middleman": "1008", "MiddlemanName": "Wide World Importers", "DataAreaId": "frrt", "CreatedBy": "123", "CreatedDateTime": "2016-01-25T12:17:57" } ], "lines": [ { "ItemId": "IVA21", "FamilyId": "", "FamilyDescription": "Zapatitos", "TotalVal": 123.0, "TaxVal": 21.35, "BaseVal": 101.65, "FormId": "FR100400061", "RefundVal": 13.0, "DataAreaId": "frrt" } ], "traveler": [ { "TravelerId": "80222557", "Email": "garanda21@gmail.com", "Name": "El gio gonzales", "Country": "PE", "CountryName": "Peru", "Address": "Calle de abaja bien abajo", "Gender": 1, "Birthdate": "23/12/1982" } ]}'; $pass = '1234'; $method = 'aes128'; $iv = "1234567812345678"; $str = "sample data"; $bzstr = bzcompress($str, 9); echo $bzstr; ?>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function bzcompress() in /in/KIB9F:18 Stack trace: #0 {main} thrown in /in/KIB9F on line 18
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Fatal error: Call to undefined function bzcompress() in /in/KIB9F on line 18
Process exited with code 255.

preferences:
162.24 ms | 402 KiB | 183 Q