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; ?> //压缩率并列最高 <?php $compressed = gzdeflate('Compress me', 9); echo $compressed; //压缩率并列最高 — Compress a string into bzip2 encoded data $str = "sample data"; $bzstr = bzcompress($str, 9); echo $bzstr;
Output for 7.0.0 - 7.1.0
str99 x�s��-(J-.V�M�? //压缩率并列最高 s��-(J-.V�M Fatal error: Uncaught Error: Call to undefined function bzcompress() in /in/LcmCo:24 Stack trace: #0 {main} thrown in /in/LcmCo on line 24
Process exited with code 255.
Output for 5.0.0 - 5.6.28
str99 x�s��-(J-.V�M�? //压缩率并列最高 s��-(J-.V�M Fatal error: Call to undefined function bzcompress() in /in/LcmCo on line 24
Process exited with code 255.
Output for 4.4.5 - 4.4.9
str99 x�s��-(J-.V�M�? //压缩率并列最高 s��-(J-.V�M Fatal error: Call to undefined function: bzcompress() in /in/LcmCo on line 24
Process exited with code 255.
Output for 4.3.2 - 4.4.4
str99 x�s��-(J-.V�M�? //压缩率并列最高 s��-(J-.V�M Fatal error: Call to undefined function: bzcompress() in /in/LcmCo on line 24
Process exited with code 255.
Output for 4.3.0 - 4.3.1
str99 x�s��-(J-.V�M�? //压缩率并列最高 s��-(J-.V�M Fatal error: Call to undefined function: bzcompress() in /in/LcmCo on line 24