3v4l.org

run code in 300+ PHP versions simultaneously
<?php $post_id = array((object) (array( 'post_id' => 140, )), (object) (array( 'post_id' => 141, )), (object) (array( 'post_id' => 142, ))); print_r($post_id); foreach ($post_id as $key => $value) { $result[] = $value->post_id; } print_r($result);

preferences:
53.86 ms | 402 KiB | 5 Q