3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once 'readline.php'; $len = readline('Insert lenght of the array' . PHP_EOL); $arr = []; $mid = $len / 2; for ($i = 0; $i < $len; $i++) { $arr[] = readline('Insert number' . PHP_EOL); if ($len % 2 !== 0 && $arr[ceil($mid) + 1] == [ceil($mid) + 1] ) { $ismirror = true; }elseif ($len % 2 == 0 && $arr[$mid] == $arr[$mid +1] && $arr[$mid - 1] == $arr[$mid + 2]){ $ismirror = true; } } echo $ismirror ? 'Yes' : 'No';
Output for git.master, git.master_jit, rfc.property-hooks
Warning: require_once(): open_basedir restriction in effect. File(readline.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/e8LPh on line 3 Warning: require_once(readline.php): Failed to open stream: Operation not permitted in /in/e8LPh on line 3 Fatal error: Uncaught Error: Failed opening required 'readline.php' (include_path='.:') in /in/e8LPh:3 Stack trace: #0 {main} thrown in /in/e8LPh on line 3
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:
50.95 ms | 402 KiB | 8 Q