3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function _div($params = array(), $content=null) { $value = preg_replace("/(\d+)-(\d+)-(\d+)\s(\d+):(\d+):(\d+)/", "$1.$2.$3 $4:$5", $value); if(count($params) > 0) { $createParams = array_map(create_function('$key, $value', 'return $key."=\'".$value."\'";'), array_keys($params), array_values($params)); $paramsText = implode(" ",$createParams); } return "<div ".$paramsText.">".$content."</div>"; } print _div(array('field' => 'teszt'), 'faszom');
Output for 5.0.4 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
Notice: Undefined variable: value in /in/pUjsp on line 3 <div field='teszt'>faszom</div>
Output for hhvm-3.12.0
Notice: Undefined variable: value in /in/pUjsp on line -1 <div field='teszt'>faszom</div>
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: value in /in/pUjsp on line 3 <div field='teszt'>faszom</div>