3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $opt_dupa = 'a'; $o['dupa'] = 'b'; extract((array) $o, EXTR_PREFIX_ALL | EXTR_IF_EXISTS, 'opt'); var_dump($opt_dupa);
based on CZYLt
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: extract(): Invalid extract type in /in/qhSY0 on line 4 string(1) "a"
Output for hhvm-3.10.0 - 3.12.0
string(1) "a"
Output for 4.3.2 - 5.2.17
Warning: extract(): Unknown extract type in /in/qhSY0 on line 4 string(1) "a"
Output for 4.3.0 - 4.3.1
Warning: extract() [http://www.php.net/function.extract]: Unknown extract type in /in/qhSY0 on line 4 string(1) "a"