3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array( 'foo', 'bar', 'baz', ); $filtered_array = array_filter( $array, fn ( $value ) => $value !== 'bar', ); var_dump( $filtered_array ); echo "New: "; echo array_last( $filtered_array ); echo "Old: "; echo $filtered_array[ count( $filtered_array ) - 1 ];
Output for git.master_jit, git.master
array(2) { [0]=> string(3) "foo" [2]=> string(3) "baz" } New: bazOld: Warning: Undefined array key 1 in /in/cMG4N on line 20

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:
42.98 ms | 527 KiB | 4 Q