3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<JS function submitData(element_id, url, change_id) {... ... } ... window.addEventListener('beforeunload', function (e) { submitData(1, "http://mysite/metrics, 3");}); window.addEventListener('beforeunload', function (e) { submitData(1, "http://mysite/metrics, 2");}); window.addEventListener('beforeunload', function (e) { submitData(1, "http://mysite/metrics, 4");}); JS; $change_ids = [19, 7, 11]; vprintf( preg_replace('~metrics,\s*\K\d+~', '%d', $string), $change_ids );
Output for git.master, git.master_jit, rfc.property-hooks
function submitData(element_id, url, change_id) {... ... } ... window.addEventListener('beforeunload', function (e) { submitData(1, "http://mysite/metrics, 19");}); window.addEventListener('beforeunload', function (e) { submitData(1, "http://mysite/metrics, 7");}); window.addEventListener('beforeunload', function (e) { submitData(1, "http://mysite/metrics, 11");});

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:
41.01 ms | 406 KiB | 5 Q