Server IP : 192.64.118.117 / Your IP : 3.138.116.224 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/php51/usr/share/pear/test/File_MARC/tests/ |
Upload File : |
--TEST-- marc_007: Use key=>value iteration for tags and codes --FILE-- <?php $dir = dirname(__FILE__); require 'File/MARC.php'; $marc_file = new File_MARC($dir . '/' . 'example.mrc'); if ($marc_record = $marc_file->next()) { foreach ($marc_record->getFields() as $tag=>$value) { print "$tag: "; if ($value instanceof File_MARC_Control_Field) { print $value->getData(); } else { foreach ($value->getSubfields() as $code=>$subdata) { print "_$code"; } } print "\n"; } } ?> --EXPECT-- 001: 0000000044 003: EMILDA 008: 980120s1998 fi j 000 0 swe 020: _a_c 035: _9 040: _a 042: _9_9 084: _a_2 084: _5_a_2 084: _5_a_2 084: _5_a_2 100: _a_d 245: _a_c 250: _a 260: _a_b_c_e_f 300: _a_b_c 440: _a_x 500: _a 599: _a 740: _a 775: _z_w_9 841: _5_a_b_e 841: _5_a_b_e 841: _5_a_b_e 841: _5_a_b_e 841: _5_a_b_e 841: _5_a_b_e 852: _5_b_c_h_j 852: _5_b_c_h 852: _5_b 852: _5_b_j 852: _5_b_c_h_j 852: _5_b_h_j 900: _a_d_u_d 900: _a_d_u_d 900: _a_d_u_d 900: _a_d_u_d 900: _a_d_u_d 900: _a_d_u_d 976: _a_b 005: 20050204111518.0