3v4l.org

run code in 500+ PHP versions simultaneously
<?php $needles = ['a','c','r','r']; $haystacks = ['carr','car','arc','ra','c','abc','do','aa','rr', 'rrr', 'caca', 'cacao']; $regexes = array_map(fn($v) => "/$v/", $needles); var_export( array_filter( $haystacks, fn($hay) => !preg_replace($regexes, '', $hay, 1) ) );
Output for rfc.property-hooks, git.master, git.master_jit
array ( 0 => 'carr', 1 => 'car', 2 => 'arc', 3 => 'ra', 4 => 'c', 8 => 'rr', )

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:
51.99 ms | 1266 KiB | 4 Q