3v4l.org

run code in 300+ PHP versions simultaneously
<?php $needle = 'www'; $sentence = 'This www.google.com is the http://www.facebook.com website that https://www.amazon.com make me awesome'; $pieces = explode(" ", $sentence); $urls = []; $urls = array_filter($pieces, function($v) use($needle) { return stripos($v, $needle) !== false; }); var_dump($urls);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [1]=> string(14) "www.google.com" [4]=> string(23) "http://www.facebook.com" [7]=> string(22) "https://www.amazon.com" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

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


preferences:
66.33 ms | 401 KiB | 8 Q