3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 0 => array( 0 => ' abc', 1 => ' def', 2 => 'ghi ' ) ); var_dump($a); array_walk($a, 'trim'); var_dump($a);
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [0]=> array(3) { [0]=> string(4) " abc" [1]=> string(4) " def" [2]=> string(5) "ghi " } } Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /in/846Ji:14 Stack trace: #0 [internal function]: trim(Array, 0) #1 /in/846Ji(14): array_walk(Array, 'trim') #2 {main} thrown in /in/846Ji on line 14
Process exited with code 255.

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:
47.25 ms | 401 KiB | 8 Q