3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Create array of paths --example from your path ***use right paths***; $path = array( 'SITE_ROOT' => $_SERVER['DOCUMENT_ROOT'], 'CORE_PATH' => '/core', 'INCLUDE_PATH' => '/inc', 'LAYOUT_PATH' => '/layout', 'BLOCK_PATH' => '/blocks', 'STATIC_PATH' => '/static' ); //usage: createPath( $path ); //Testiing echo SITE_ROOT; function createPath( $path ) { if( empty( $path ) ) { die("Array of path required!"); } foreach( $path as $constant => $path ) { if(!defined( strtoupper($constant) ) ) { define( strtoupper($constant), $path . '/'); } } }
Output for git.master, git.master_jit, rfc.property-hooks
/

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:
142.26 ms | 405 KiB | 5 Q