3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = "[gallery-1] <p>Test...test...test...</p> [gallery-2]"; preg_match_all("/\[gallery-([1-9])\]/", $code, $matches); $galleries = []; foreach ($matches[1] as $id) { $galleries[$id] = 'x'; // Somehow load a gallery basing on id; } foreach ($galleries as $id => $code) { $code = str_ireplace("[gallery-" . $id . "]", $code); } echo $code;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: str_ireplace() expects at least 3 arguments, 2 given in /in/MTtHM:14 Stack trace: #0 /in/MTtHM(14): str_ireplace('[gallery-1]', 'x') #1 {main} thrown in /in/MTtHM on line 14
Process exited with code 255.

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:
46.14 ms | 401 KiB | 8 Q