3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set( 'error_reporing', -1 ); ini_set( 'display_errors', 1 ); $result = array_slice( array(), 10, 10, true ); var_dump( $result ); exit; $found = null; $route = '/_ticket/'; foreach ( explode( '/', trim( $route, '/' ) ) as $part => $r ) { $uscore = strpos( $r, '_' ); $times = substr_count( $r, '_' ); if ( 1 != $times || 0 != $uscore ) { continue; } $found = $part; break; } if ( null !== $found ) { $parts = explode( '/', trim( $route, '/' ) ); $before = array_slice( $parts, 0, $found, true ); $after = array_slice( $parts, $found + 1, null, true ); $replacePart = ltrim( $parts[ $found ], '_' ); $before[] = $replacePart; $before[] = $replacePart; foreach ( $after as $part ) { $before[] = $part; } var_dump( $before ); var_dump( $after ); }
Output for git.master, git.master_jit, rfc.property-hooks
array(0) { }

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.54 ms | 401 KiB | 8 Q