3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(-1); // $sample = [ // 'view' => [ // 'path'=> [ // '1', // ]] // ]; $sample = []; if(is_array($sample['view']['path'])){ echo 1; } if(is_array($sample['view']) && is_array($sample['view']['path'])){ echo 1; } //vs if(isset($sample['view']['path']) && is_array($sample['view']['path'])){ echo 1; }
Output for git.master, git.master_jit
Warning: Undefined array key "view" in /in/YLXf7 on line 14 Warning: Trying to access array offset on value of type null in /in/YLXf7 on line 14 Warning: Undefined array key "view" in /in/YLXf7 on line 18
Output for rfc.property-hooks
Warning: Undefined array key "view" in /in/YLXf7 on line 14 Warning: Trying to access array offset on null in /in/YLXf7 on line 14 Warning: Undefined array key "view" in /in/YLXf7 on line 18

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:
13.47 ms | 407 KiB | 5 Q