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 ){ $value = array( 'value' => $value, 'rule' => 'ctype_alnum', ); }); 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><pre>array(5) { [0]=> array(2) { ["value"]=> string(4) "val1" ["rule"]=> string(11) "ctype_alnum" } [1]=> array(2) { ["value"]=> string(4) "val2" ["rule"]=> string(11) "ctype_alnum" } [2]=> array(2) { ["value"]=> string(4) "val3" ["rule"]=> string(11) "ctype_alnum" } [3]=> array(2) { ["value"]=> string(4) "val4" ["rule"]=> string(11) "ctype_alnum" } [4]=> array(2) { ["value"]=> string(4) "val5" ["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.41 ms | 403 KiB | 8 Q