3v4l.org

run code in 300+ PHP versions simultaneously
<?php function msgme(&$message) { foreach (is_array($message) ? $message : [&$message] as &$field) { $field = 'We are cool!'; } } $m1 = "Shit happened\n"; msgme($m1); print $m1; print "\n\n"; $m2 = ['t1'=>'Shit happened']; msgme($m2); print_r($m2);
Output for git.master, git.master_jit, rfc.property-hooks
We are cool! Array ( [t1] => Shit happened )

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:
84.96 ms | 1800 KiB | 4 Q