3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new ArrayIterator( array( 'foo' => 1, 'bar' => 2, ) ); $keys = array_keys( $x ); if ( ! empty( $keys ) && is_array( $keys ) ) { print "PASS"; } else { print "FAIL"; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, ArrayIterator given in /in/bdoq5:7 Stack trace: #0 /in/bdoq5(7): array_keys(Object(ArrayIterator)) #1 {main} thrown in /in/bdoq5 on line 7
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:
68.81 ms | 401 KiB | 8 Q