3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_export(preg_split('~..\K~', 'abcdefghijklm', 3)); echo "\n---\n"; var_export([preg_replace('~..\K~','*', 'abcdefghijklm', 3, $count1), $count1]); echo "\n---\n"; var_export([preg_filter('~..\K~', '*', 'abcdefghijklm', 3, $count2), $count2]); echo "\n---\n"; var_export(preg_grep('~..\K~', ['abc', 'def', 'ghi', 'jklm'])); echo "\n---\n"; var_export(preg_match_all('~(..)\K~', 'abcdefghijklm', $m1) ? $m1 : null); echo "\n---\n"; var_export(preg_match_all('~..\K~', 'abcdefghijklm', $m2) ? $m2 : null);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'ab', 1 => 'cd', 2 => 'efghijklm', ) --- array ( 0 => 'ab*cd*ef*ghijklm', 1 => 3, ) --- array ( 0 => 'ab*cd*ef*ghijklm', 1 => 3, ) --- array ( 0 => 'abc', 1 => 'def', 2 => 'ghi', 3 => 'jklm', ) --- array ( 0 => array ( 0 => '', 1 => '', 2 => '', 3 => '', 4 => '', 5 => '', ), 1 => array ( 0 => 'ab', 1 => 'cd', 2 => 'ef', 3 => 'gh', 4 => 'ij', 5 => 'kl', ), ) --- array ( 0 => array ( 0 => '', 1 => '', 2 => '', 3 => '', 4 => '', 5 => '', ), )

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:
173.27 ms | 407 KiB | 5 Q