3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $product = array('material', 'britelki', 'chaschka', 'kostochki', 'vkladish', 'zastejka'); if( !function_exists('create_from_variable') ){ function create_from_variable($arr){ foreach($product as $key){ create_function('',"$gc_".$key." = 123; echo '<p>$gc_".$key."</p>';"); } } } create_from_variable($product);
Output for 5.1.0 - 7.2.0
Notice: Undefined variable: product in /in/OL72p on line 8 Warning: Invalid argument supplied for foreach() in /in/OL72p on line 8
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.0.5
Warning: Invalid argument supplied for foreach() in /in/OL72p on line 8
Output for 4.3.11