3v4l.org

run code in 500+ PHP versions simultaneously
<?php $fileContents = <<<TEXT 1|2 2|6 3|8 4|3 5|10 TEXT; $_GET['candidate'] = '4'; if (isset($_GET['candidate'])) { $fileContents = preg_replace_callback( '~^' . (int)$_GET['candidate'] . '\|\K\d+~m', function($m) { return ++$m[0]; }, $fileContents ); echo "New total: " . array_sum(preg_match_all('~\|\K\d+~', $fileContents, $m) ? $m[0] : []); echo "\n---\n"; echo $fileContents; //file_put_contents('results.txt', $fileContents); }
Output for git.master, git.master_jit, rfc.property-hooks
New total: 30 --- 1|2 2|6 3|8 4|4 5|10

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:
48.94 ms | 1378 KiB | 4 Q