3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $search = htmlentities("(apple|phpinfo())/e\0"); if (strpos($search, 'apple') !== false){ echo preg_replace("/".$search."/", $search, "apple"); }else echo "Please search for apple, orange, banana, or kiwi.";
based on 6BTcZ

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
Warning: preg_replace(): Null byte in regex in /in/M0de4 on line 4
Output for Arrow functions
Warning: preg_replace(): Null byte in regex in /in/M0de4 on line 4
Output for Object typehint
Warning: preg_replace(): Null byte in regex in /in/M0de4 on line 4
Output for Array change keys
Warning: preg_replace(): Null byte in regex in /in/M0de4 on line 4
Output for Lexical anon
Warning: preg_replace(): Null byte in regex in /in/M0de4 on line 4

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page