3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'this is a string'; // Test 1 if (isset($string['check'][0])) { echo 'found'; } else { echo 'not found'; } echo '<hr />'; // Test 2 if (isset($string[0])) { echo 'found'; } else { echo 'not found'; } echo '<hr />'; // Test 3 if (isset($string['check'])) { echo 'found'; } else { echo 'not found'; } echo '<hr />'; // Test 4 if (isset($string['check'][100])) { echo 'found'; } else { echo 'not found'; } echo '<hr />'; var_dump($string['check'][0]); // Warning throw out
Output for git.master, git.master_jit, rfc.property-hooks
not found<hr />found<hr />not found<hr />not found<hr /> Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /in/Rkuvv:41 Stack trace: #0 {main} thrown in /in/Rkuvv on line 41
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:
47.66 ms | 401 KiB | 8 Q