3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var = 'original value'; $ref =& $var; $hash = ['var' => 'new value']; extract($hash, EXTRACT_REFS); echo 'ref: ', $ref, ' var: ', $var;
based on kEsIH
Output for 7.2.0
Warning: Use of undefined constant EXTRACT_REFS - assumed 'EXTRACT_REFS' (this will throw an Error in a future version of PHP) in /in/5eLMn on line 8 Warning: extract() expects parameter 2 to be integer, string given in /in/5eLMn on line 8 ref: original value var: original value
Output for 7.0.0 - 7.1.10
Notice: Use of undefined constant EXTRACT_REFS - assumed 'EXTRACT_REFS' in /in/5eLMn on line 8 Warning: extract() expects parameter 2 to be integer, string given in /in/5eLMn on line 8 ref: original value var: original value
Output for 5.4.9 - 5.6.28
Notice: Use of undefined constant EXTRACT_REFS - assumed 'EXTRACT_REFS' in /in/5eLMn on line 8 Warning: extract() expects parameter 2 to be long, string given in /in/5eLMn on line 8 ref: original value var: original value
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/5eLMn on line 6
Process exited with code 255.