3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $qqq=array ( 0 => array ( 'id' => '5254', 'name' => 'プロテーマ', 'description_outline' => 'テスト', 'category_id' => '1006', 'category_name' => 'ダイエット', 'display_start_at' => 'Dec 19 2016 12:00:00:000AM', 'upload_id' => '1150', 'upload_path' => '/media/theme/', 'upload_ext' => 'jpg', ), 1 => array ( 'id' => '5190', 'name' => 'プロのテーマ(終わりなし)', 'description_outline' => 'ないよ', 'category_id' => '1003', 'category_name' => 'メイクアップ', 'display_start_at' => 'Jun 25 2015 12:00:00:000AM', 'upload_id' => NULL, 'upload_path' => NULL, 'upload_ext' => NULL, ), 2 => array ( 'id' => '5182', 'name' => 'ドクターテーマ', 'description_outline' => 'ドクター', 'category_id' => '1011', 'category_name' => 'ドクター', 'display_start_at' => 'Jun 24 2015 12:00:00:000AM', 'upload_id' => NULL, 'upload_path' => NULL, 'upload_ext' => NULL, ), 3 => array ( 'id' => '5057', 'name' => '5057手術を伴わないキレイになるコラム', 'description_outline' => '手術をしないでキレイになるためのあらゆる情報を専門のドクターがお届け! 「お肌が最近荒れ気味で…」「プチ整形ってどんなの?」などの疑問や悩みをお持ちのあなたに、お役立ちのコラムです。', 'category_id' => '1011', 'category_name' => 'ドクター', 'display_start_at' => 'Mar 1 2015 12:00:00:000AM', 'upload_id' => '1116', 'upload_path' => '/media/theme/', 'upload_ext' => 'jpg', ), ); $bbb= array ( 0 => '5184', 1 => '5188', 2 => '5190', 3 => '5254', ); foreach ($qqq as $val) { $aaa .= in_array($val['id'],$bbb); } var_dump($aaa);
based on I1cTQ
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0beta1
Notice: Undefined variable: aaa in /in/OeCXW on line 61 string(2) "11"
Output for hhvm-3.15.4
string(2) "11"