3v4l.org

run code in 300+ PHP versions simultaneously
<?php #$srch = "{${eval("echo phpinfo();//apple1(?=/)\\e")}}"; #$srch = "{${eval("phpinfo();apple(?=/)\e")}}"; #$srch = "include(eval(phpinfo());apple(?=/)\\e)"; #$srch = "phpinfo();//apple(?=/)\e" #$srch = "(phpinfo()#|apple)(?=/)/e"; #$srch = "(phpinfo();#|apple)(?=/)/e"; $srch = "phpinfo();#|apple/e\x0"; echo "\n\n\n\n\n"; echo "Raw string is:\t\t" . $srch; echo "\n"; $search = htmlentities($srch); echo "HTMLEntities string is:\t" . $search; echo "\n"; if (strpos($search, 'apple') !== false){ echo "in the if!"; echo "\n"; echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "apple"); }
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Raw string is: phpinfo();#|apple/e HTMLEntities string is: phpinfo();#|apple/e in the if! Warning: preg_replace(): NUL is not a valid modifier in /in/otLG3 on line 19
Output for 5.4.7 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
Raw string is: phpinfo();#|apple/e HTMLEntities string is: phpinfo();#|apple/e in the if! Warning: preg_replace(): Null byte in regex in /in/otLG3 on line 19
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.6
Raw string is: phpinfo();#|apple/e HTMLEntities string is: phpinfo();#|apple/e in the if! Warning: phpinfo() has been disabled for security reasons in /in/otLG3(19) : regexp code on line 1
Output for 5.3.29
Raw string is: phpinfo();#|apple/e HTMLEntities string is: phpinfo();#|apple/e in the if! phpinfo() PHP Version => 5.3.29 System => Linux php_shell 3.8.2 #3 SMP Fri May 31 14:28:26 UTC 2013 x86_64 Build Date => Aug 22 2014 13:23:48 Configure Command => './configure' '--prefix=/var/tmp/phpfarm/inst/php-5.3.29' '--exec-prefix=/var/tmp/phpfarm/inst/php-5.3.29' '--disable-short-tags' '--without-pear' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-pcntl' '--enable-soap' '--enable-sockets' '--enable-sqlite-utf8' '--enable-wddx' '--enable-zip' '--with-zlib' '--with-gettext' Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /var/tmp/phpfarm/inst/php-5.3.29/lib Loaded Configuration File => /etc/php.ini Scan this dir for additional .ini files => (none) Additional .ini files parsed => (none) PHP API => 20090626 PHP Extension => 20090626 Zend Extension => 220090626 Zend Extension Build => API220090626,NTS PHP Extension Build => API20090626,NTS Debug Build => no Thread Safety => disabled Zend Memory Manager => enabled Zend Multibyte Support => disabled IPv6 Support => enabled Registered PHP Streams => compress.zlib, php, file, glob, data, http, ftp, phar, zip Registered Stream Socket Transports => tcp, udp, unix, udg Registered Stream Filters => zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk This program makes use of the Zend Scripting Language Engine: Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies _______________________________________________________________________ Configuration bcmath BCMath support => enabled Directive => Local Value => Master Value bcmath.scale => 0 => 0 calendar Calendar support => enabled Core PHP Version => 5.3.29 Directive => Local Value => Master Value allow_call_time_pass_reference => Off => Off allow_url_fopen => On => On allow_url_include => Off => Off always_populate_raw_post_data => Off => Off arg_separator.input => & => & arg_separator.output => & => & asp_tags => Off => Off auto_append_file => no value => no value auto_globals_jit => On => On auto_prepend_file => no value => no value browscap => no value => no value default_charset => no value => no value default_mimetype => text/html => text/html define_syslog_variables => Off => Off disable_classes => no value => no value disable_functions => ini_set,pcntl_fork => ini_set,pcntl_fork display_errors => STDOUT => STDOUT display_startup_errors => On => On doc_root => no value => no value docref_ext => no value => no value docref_root => no value => no value enable_dl => Off => Off error_append_string => no value => no value error_log => no value => no value error_prepend_string => no value => no value error_reporting => -1 => -1 exit_on_timeout => Off => Off expose_php => On => On extension_dir => /var/tmp/phpfarm/inst/php-5.3.29/lib/php/extensions/no-debug-non-zts-20090626 => /var/tmp/phpfarm/inst/php-5.3.29/lib/php/extensions/no-debug-non-zts-20090626 file_uploads => On => On highlight.bg => <font style="color: #FFFFFF">#FFFFFF</font> => <font style="color: #FFFFFF">#FFFFFF</font> highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font> highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font> highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font> highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font> highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font> html_errors => Off => Off ignore_repeated_errors => Off => Off ignore_repeated_source => Off => Off ignore_user_abort => Off => Off implicit_flush => On => On include_path => .: => .: log_errors => Off => Off log_errors_max_len => 1024 => 1024 magic_quotes_gpc => On => On magic_quotes_runtime => Off => Off magic_quotes_sybase => Off => Off mail.add_x_header => Off => Off mail.force_extra_parameters => no value => no value mail.log => no value => no value max_execution_time => 0 => 0 max_file_uploads => 20 => 20 max_input_nesting_level => 64 => 64 max_input_time => -1 => -1 max_input_vars => 1000 => 1000 memory_limit => 64M => 64M open_basedir => no value => no value output_buffering => 0 => 0 output_handler => no value => no value post_max_size => 8M => 8M precision => 14 => 14 realpath_cache_size => 16K => 16K realpath_cache_ttl => 120 => 120 register_argc_argv => On => On register_globals => Off => Off register_long_arrays => On => On report_memleaks => On => On report_zend_debug => Off => Off request_order => no value => no value safe_mode => Off => Off safe_mode_exec_dir => /usr/local/php/bin => /usr/local/php/bin safe_mode_gid => Off => Off safe_mode_include_dir => no value => no value sendmail_from => no value => no value sendmail_path => /usr/bin/sendmail -t -i => /usr/bin/sendmail -t -i serialize_precision => 100 => 100 short_open_tag => Off => Off SMTP => localhost => localhost smtp_port => 25 => 25 sql.safe_mode => Off => Off track_errors => Off => Off unserialize_callback_func => no value => no value upload_max_filesize => 2M => 2M upload_tmp_dir => no value => no value user_dir => no value => no value user_ini.cache_ttl => 300 => 300 user_ini.filename => no value => no value variables_order => EGPCS => EGPCS xmlrpc_error_number => 0 => 0 xmlrpc_errors => Off => Off y2k_compliance => On => On zend.enable_gc => On => On ctype ctype functions => enabled date date/time support => enabled "Olson" Timezone Database Version => 2013.3 Timezone Database => internal Default timezone => Europe/Amsterdam Directive => Local Value => Master Value date.default_latitude => 31.7667 => 31.7667 date.default_longitude => 35.2333 => 35.2333 date.sunrise_zenith => 90.583333 => 90.583333 date.sunset_zenith => 90.583333 => 90.583333 date.timezone => Europe/Amsterdam => Europe/Amsterdam dom DOM/XML => enabled DOM/XML API Version => 20031129 libxml Version => 2.9.1 HTML Support => enabled XPath Support => enabled XPointer Support => enabled Schema Support => enabled RelaxNG Support => enabled ereg Regex Library => Bundled library enabled exif EXIF Support => enabled EXIF Version => 1.4 $Id$ Supported EXIF Version => 0220 Supported filetypes => JPEG,TIFF Directive => Local Value => Master Value exif.decode_jis_intel => JIS => JIS exif.decode_jis_motorola => JIS => JIS exif.decode_unicode_intel => UCS-2LE => UCS-2LE exif.decode_unicode_motorola => UCS-2BE => UCS-2BE exif.encode_jis => no value => no value exif.encode_unicode => ISO-8859-15 => ISO-8859-15 fileinfo fileinfo support => enabled version => 1.0.5-dev filter Input Validation and Filtering => enabled Revision => $Id: 209a1c3c98c04a5474846e7bbe8ca72054ccfd4f $ Directive => Local Value => Master Value filter.default => unsafe_raw => unsafe_raw filter.default_flags => no value => no value ftp FTP support => enabled gettext GetText Support => enabled hash hash support => enabled Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b salsa10 salsa20 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 iconv iconv support => enabled iconv implementation => glibc iconv library version => 2.19 Directive => Local Value => Master Value iconv.input_encoding => ISO-8859-1 => ISO-8859-1 iconv.internal_encoding => ISO-8859-1 => ISO-8859-1 iconv.output_encoding => ISO-8859-1 => ISO-8859-1 json json support => enabled json version => 1.2.1 libxml libXML support => active libXML Compiled Version => 2.9.1 libXML Loaded Version => 20901 libXML streams => enabled mbstring Multibyte Support => enabled Multibyte string engine => libmbfl HTTP input encoding translation => disabled mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1. Multibyte (japanese) regex support => enabled Multibyte regex (oniguruma) backtrack check => On Multibyte regex (oniguruma) version => 4.7.1 Directive => Local Value => Master Value mbstring.detect_order => no value => no value mbstring.encoding_translation => Off => Off mbstring.func_overload => 0 => 0 mbstring.http_input => pass => pass mbstring.http_output => pass => pass mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml) mbstring.internal_encoding => no value => no value mbstring.language => neutral => neutral mbstring.strict_detection => Off => Off mbstring.substitute_character => no value => no value pcntl pcntl support => enabled pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 8.32 2012-11-30 Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 PDO PDO support => enabled PDO drivers => sqlite, sqlite2 pdo_sqlite PDO Driver for SQLite 3.x => enabled SQLite Library => 3.7.7.1 Phar Phar: PHP Archive support => enabled Phar EXT version => 2.0.1 Phar API version => 1.1.1 SVN revision => $Id: 21d763042eb5769ae0a09dc1118df2b5aae6fb33 $ Phar-based phar archives => enabled Tar-based phar archives => enabled ZIP-based phar archives => enabled gzip compression => enabled bzip2 compression => disabled (install pecl/bz2) OpenSSL support => disabled (install ext/openssl) Phar based on pear/PHP_Archive, original concept by Davey Shafik. Phar fully realized by Gregory Beaver and Marcus Boerger. Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle. Directive => Local Value => Master Value phar.cache_list => no value => no value phar.readonly => On => On phar.require_hash => On => On posix Revision => $Id: 5a2da3946b96c5afbf3aff8db8a8681f8bedee85 $ Reflection Reflection => enabled Version => $Id: 4af6c4c676864b1c0bfa693845af0688645c37cf $ session Session Support => enabled Registered save handlers => files user sqlite Registered serializer handlers => php php_binary wddx Directive => Local Value => Master Value session.auto_start => Off => Off session.bug_compat_42 => On => On session.bug_compat_warn => On => On session.cache_expire => 180 => 180 session.cache_limiter => nocache => nocache session.cookie_domain => no value => no value session.cookie_httponly => Off => Off session.cookie_lifetime => 0 => 0 session.cookie_path => / => / session.cookie_secure => Off => Off session.entropy_file => no value => no value session.entropy_length => 0 => 0 session.gc_divisor => 100 => 100 session.gc_maxlifetime => 1440 => 1440 session.gc_probability => 1 => 1 session.hash_bits_per_character => 4 => 4 session.hash_function => 0 => 0 session.name => PHPSESSID => PHPSESSID session.referer_check => no value => no value session.save_handler => files => files session.save_path => no value => no value session.serialize_handler => php => php session.use_cookies => On => On session.use_only_cookies => On => On session.use_trans_sid => 0 => 0 SimpleXML Simplexml support => enabled Revision => $Id: 02ab7893b36d51e9c59da77d7e287eb3b35e1e32 $ Schema support => enabled soap Soap Client => enabled Soap Server => enabled Directive => Local Value => Master Value soap.wsdl_cache => 1 => 1 soap.wsdl_cache_dir => /tmp => /tmp soap.wsdl_cache_enabled => 1 => 1 soap.wsdl_cache_limit => 5 => 5 soap.wsdl_cache_ttl => 86400 => 86400 sockets Sockets Support => enabled SPL SPL support => enabled Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException SQLite SQLite support => enabled PECL Module version => 2.0-dev $Id$ SQLite Library => 2.8.17 SQLite Encoding => UTF-8 Directive => Local Value => Master Value sqlite.assoc_case => 0 => 0 sqlite3 SQLite3 support => enabled SQLite3 module version => 0.7-dev SQLite Library => 3.7.7.1 Directive => Local Value => Master Value sqlite3.extension_dir => no value => no value standard Dynamic Library Support => enabled Path to sendmail => /usr/bin/sendmail -t -i Directive => Local Value => Master Value assert.active => 1 => 1 assert.bail => 0 => 0 assert.callback => no value => no value assert.quiet_eval => 0 => 0 assert.warning => 1 => 1 auto_detect_line_endings => 0 => 0 default_socket_timeout => 60 => 60 from => no value => no value safe_mode_allowed_env_vars => PHP_ => PHP_ safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH url_rewriter.tags => a=href,area=href,frame=src,form=,fieldset= => a=href,area=href,frame=src,form=,fieldset= user_agent => no value => no value tokenizer Tokenizer Support => enabled wddx WDDX Support => enabled WDDX Session Serializer => enabled xml XML Support => active XML Namespace Support => active libxml2 Version => 2.9.1 xmlreader XMLReader => enabled xmlwriter XMLWriter => enabled zip Zip => enabled Extension Version => $Id: b1a1a3628c4ed0ad78fb0cc4a99b06a56aa281c4 $ Zip version => 1.11.0 Libzip version => 0.10.1 zlib ZLib Support => enabled Stream Wrapper support => compress.zlib:// Stream Filter support => zlib.inflate, zlib.deflate Compiled Version => 1.2.8 Linked Version => 1.2.8 Directive => Local Value => Master Value zlib.output_compression => Off => Off zlib.output_compression_level => -1 => -1 zlib.output_handler => no value => no value Additional Modules Module Name Environment Variable => Value => /usr/bin/php-5.3.29 TERM => xterm PATH => /usr/bin:/bin LANG => C SHELL => /bin/sh MAIN => /var/mail/nobody LOGNAME => nobody USER => nobody USERNAME => nobody HOME => / PHP Variables Variable => Value _SERVER["TERM"] => xterm _SERVER["PATH"] => /usr/bin:/bin _SERVER["LANG"] => C _SERVER["SHELL"] => /bin/sh _SERVER["MAIN"] => /var/mail/nobody _SERVER["LOGNAME"] => nobody _SERVER["USER"] => nobody _SERVER["USERNAME"] => nobody _SERVER["HOME"] => / _SERVER["PHP_SELF"] => /in/otLG3 _SERVER["SCRIPT_NAME"] => /in/otLG3 _SERVER["SCRIPT_FILENAME"] => /in/otLG3 _SERVER["PATH_TRANSLATED"] => /in/otLG3 _SERVER["DOCUMENT_ROOT"] => _SERVER["REQUEST_TIME"] => 1410239383 _SERVER["argv"] => Array ( [0] => /in/otLG3 ) _SERVER["argc"] => 1 _ENV["TERM"] => xterm _ENV["PATH"] => /usr/bin:/bin _ENV["LANG"] => C _ENV["SHELL"] => /bin/sh _ENV["MAIN"] => /var/mail/nobody _ENV["LOGNAME"] => nobody _ENV["USER"] => nobody _ENV["USERNAME"] => nobody _ENV["HOME"] => / PHP License This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net. 1

preferences:
202.24 ms | 433 KiB | 261 Q