3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $Wales = 'Swansea'; extract($capitalcities, EXTR_SKIP); $capitalcities['England'] = 'London'; $capitalcities['Scotland'] = 'Edinburgh'; $capitalcities['Wales'] = 'Cardiff'; print $Wales; print $Scotland; extract($capitalcities, EXTR_PREFIX_SAME, "country"); print $Wales; print $country_England; extract($capitalcities, EXTR_PREFIX_ALL, "country"); ?>
based on OFtBN
Output for 5.3.0 - 7.2.0
Warning: extract() expects parameter 1 to be array, null given in /in/jpMNU on line 3 Swansea Notice: Undefined variable: Scotland in /in/jpMNU on line 8 Swansea Notice: Undefined variable: country_England in /in/jpMNU on line 11
Output for 5.2.7 - 5.2.17
Warning: extract(): First argument should be an array in /in/jpMNU on line 3 Swansea Notice: Undefined variable: Scotland in /in/jpMNU on line 8 Swansea Notice: Undefined variable: country_England in /in/jpMNU on line 11
Output for 5.0.4 - 5.2.6
Notice: Undefined variable: capitalcities in /in/jpMNU on line 3 Warning: extract(): First argument should be an array in /in/jpMNU on line 3 Swansea Notice: Undefined variable: Scotland in /in/jpMNU on line 8 Swansea Notice: Undefined variable: country_England in /in/jpMNU on line 11
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: capitalcities in /in/jpMNU on line 3 Warning: extract(): First argument should be an array in /in/jpMNU on line 3 Swansea Notice: Undefined variable: Scotland in /in/jpMNU on line 8 Swansea Notice: Undefined variable: country_England in /in/jpMNU on line 11
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: capitalcities in /in/jpMNU on line 3 Warning: extract() [http://www.php.net/function.extract]: First argument should be an array in /in/jpMNU on line 3 Swansea Notice: Undefined variable: Scotland in /in/jpMNU on line 8 Swansea Notice: Undefined variable: country_England in /in/jpMNU on line 11