3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'val1', 'val2', 'val3', 'val4', 'val5', ); print_out( $array ); array_walk( $array, function( &$value, &$key ){ $tmp = &$value; $value = array( 'rule' => 'ctype_alnum', ); $key = $tmp; }); function print_out( $val ) { echo '<pre>'; var_dump( $val ); echo '</pre>'; } print_out( $array );
Output for git.master, git.master_jit, rfc.property-hooks
<pre>array(5) { [0]=> string(4) "val1" [1]=> string(4) "val2" [2]=> string(4) "val3" [3]=> string(4) "val4" [4]=> string(4) "val5" } </pre> Warning: {closure}(): Argument #2 ($key) must be passed by reference, value given in /in/cM043 on line 9 Warning: {closure}(): Argument #2 ($key) must be passed by reference, value given in /in/cM043 on line 9 Warning: {closure}(): Argument #2 ($key) must be passed by reference, value given in /in/cM043 on line 9 Warning: {closure}(): Argument #2 ($key) must be passed by reference, value given in /in/cM043 on line 9 Warning: {closure}(): Argument #2 ($key) must be passed by reference, value given in /in/cM043 on line 9 <pre>array(5) { [0]=> array(1) { ["rule"]=> string(11) "ctype_alnum" } [1]=> array(1) { ["rule"]=> string(11) "ctype_alnum" } [2]=> array(1) { ["rule"]=> string(11) "ctype_alnum" } [3]=> array(1) { ["rule"]=> string(11) "ctype_alnum" } [4]=> array(1) { ["rule"]=> string(11) "ctype_alnum" } } </pre>

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:
40.71 ms | 403 KiB | 8 Q