3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stack = range('a', 'h'); print_r($stack); $stack = array_slice($stack, 0, -4); print_r($stack); $stack[] = 'wew'; print_r($stack); echo "===========================================================\n"; $stack = range('a', 'h'); print_r($stack); $stack = array_slice($stack, 0, -4, FALSE); print_r($stack); $stack[] = 'wew'; print_r($stack); echo "===========================================================\n"; $stack = range('a', 'h'); print_r($stack); $stack = array_slice($stack, 0, -4, TRUE); print_r($stack); $stack[] = 'wew'; print_r($stack); echo "===========================================================\n";
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => a [1] => b [2] => c [3] => d [4] => e [5] => f [6] => g [7] => h ) Array ( [0] => a [1] => b [2] => c [3] => d ) Array ( [0] => a [1] => b [2] => c [3] => d [4] => wew ) =========================================================== Array ( [0] => a [1] => b [2] => c [3] => d [4] => e [5] => f [6] => g [7] => h ) Array ( [0] => a [1] => b [2] => c [3] => d ) Array ( [0] => a [1] => b [2] => c [3] => d [4] => wew ) =========================================================== Array ( [0] => a [1] => b [2] => c [3] => d [4] => e [5] => f [6] => g [7] => h ) Array ( [0] => a [1] => b [2] => c [3] => d ) Array ( [0] => a [1] => b [2] => c [3] => d [4] => wew ) ===========================================================

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