3v4l.org

run code in 300+ PHP versions simultaneously
<?php $singleLine = ['line 1 first item', 'line 1 second item']; var_dump(str_replace('item', 'ITEM', $singleLine)); $lines = [ ['line 1 first item', 'line 1 second item'], ['line 2 first item', 'line 2 second item'], ]; var_dump(str_replace('item', 'ITEM', $lines));
Output for git.master_jit, git.master, rfc.property-hooks
array(2) { [0]=> string(17) "line 1 first ITEM" [1]=> string(18) "line 1 second ITEM" } Warning: Array to string conversion in /in/F6DNs on line 10 Warning: Array to string conversion in /in/F6DNs on line 10 array(2) { [0]=> string(5) "Array" [1]=> string(5) "Array" }

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