3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // The very top of your php script $vars = get_defined_vars(); // Now do your stuff $mystring = null; // Get all the variables defined in current scope $vars = array_diff(get_defined_vars(),$vars); echo '<pre>'; print_r($vars); echo '</pre>';
Output for 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 <pre>Array ( [mystring] => ) </pre>
Output for 5.4.0 - 5.6.28
Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 Notice: Array to string conversion in /in/3mLCg on line 9 <pre>Array ( [mystring] => ) </pre>
Output for 4.3.0 - 5.3.29
<pre>Array ( [mystring] => ) </pre>