3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php $json = "{this:'is a test',and:['a','comparison','of'],multiple:'encodings',on:'json'}"; echo 'string ', strlen($json), '<br/>'; echo 'gz ', strlen(gzcompress($json)), '<br/>'; echo 'bz ', strlen(bzcompress($json)), '<br/>'; echo 'lzf ', strlen(lzf_compress($json)), '<br/>'; echo 'zlib ', strlen(zlib_encode($json, 15, 9)), '<br/>'; echo 'deflate ', strlen(zlib_encode($json, -15, 9)), '<br/>'; echo 'gzip ', strlen(zlib_encode($json, 31, 9)), '<br/>'; echo 'gzencode ', strlen(gzencode($json, 9)), '<br/>'; echo 'gzdeflate ', strlen(gzdeflate($json, 9)), '<br/>';
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.26
Parse error: syntax error, unexpected '<' in /in/69eOn 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/69eOn on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/69eOn on line 3
Process exited with code 255.