3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array( '057.ua'=>array('name' => '', 'name_genitive' => '', 'name_locative' => '', 'name_en' => ''), ); foreach($arr as $k => $v ){ $s = serialize($v); echo "UPDATE `citysites`.`cis_sites` SET `city_names` = '".$s."' WHERE `url` = 'www.".$k."';".PHP_EOL; }
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
UPDATE `citysites`.`cis_sites` SET `city_names` = 'a:4:{s:4:"name";s:0:"";s:13:"name_genitive";s:0:"";s:13:"name_locative";s:0:"";s:7:"name_en";s:0:"";}' WHERE `url` = 'www.057.ua';
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/GGN8O on line 8 UPDATE `citysites`.`cis_sites` SET `city_names` = 'a:4:{s:4:"name";s:0:"";s:13:"name_genitive";s:0:"";s:13:"name_locative";s:0:"";s:7:"name_en";s:0:"";}' WHERE `url` = 'www.057.ua';PHP_EOL