3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [ 'type' => 'comment', "line_index" => 0, "text_b64" => "OyBjUGFuZWwgZmlyc3Q6ODguMC4xMiAodXBkYXRlX3RpbWUpOjE2MTg1NDYxNDIgQ3BhbmVsOjpab25lRmlsZTo6VkVSU0lPTjoxLjMgaG9zdG5hbWU6cjExOC5sb24yLm15c2VjdXJlY2xvdWRob3N0LmNvbSBs", ], [ "line_index" => 1, "text_b64" => "OyBab25lIGZpbGUgZm9yIG9ha3RyZWVkZW50YWxtb3J0aW1lci5jby51aw==", "type" => "comment", ], [ "text_b64" => "JFRUTCAxNDQwMA==", "line_index" => 2, "type" => "control", ], [ "line_index" => 3, "dname_b64" => "b2FrdHJlZWRlbnRhbG1vcnRpbWVyLmNvLnVrLg==", "record_type" => "SOA", "ttl" => 30, "type" => "record", "data_b64" => [], ], [ "dname_b64" => "b2FrdHJlZWRlbnRhbG1vcnRpbWVyLmNvLnVrLg==", "line_index" => 10, "record_type" => "NS", "ttl" => 30, "type" => "record", "data_b64" => [], ], [ "ttl" => 30, "dname_b64" => "b2FrdHJlZWRlbnRhbG1vcnRpbWVyLmNvLnVrLg==", "line_index" => 11, "record_type" => "NS", "data_b64" => [], "type" => "record", ], ]; $result = array_filter( $arr, function (array $record) { if ($record['type'] == 'record') { return true; } return false; } ); print_r($result);

preferences:
26.9 ms | 405 KiB | 5 Q