3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = 'Compress meCompress meCompress meCompress meCompress meCompress meCompress meCompress meCompress me'; echo "str".strlen($str)."\n"; //压缩率最低(gzip压缩算法) 生成结果可以直接写到.gz文件中 //压缩率居中 –This function compress the given string using the ZLIB data format. $compressed = gzcompress('Compress me', 9); echo $compressed; //压缩率并列最高 ssed = gzdeflate('Compress me', 9); echo $compressed; //压缩率并列最高 — Compress a string into bzip2 encoded data $str = "sample data"; $bzstr = bzcompress($str, 9); echo $bzstr;
Output for 5.3.0 - 5.4.23
Parse error: syntax error, unexpected '=' in /in/k36vo on line 17
Process exited with code 255.