[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: marc_003.phpt
File is not writable. Editing disabled.
--TEST-- marc_003: getFields() with various regular expressions --SKIPIF-- <?php include('tests/skipif.inc'); ?> --FILE-- <?php $dir = dirname(__FILE__); require __DIR__ . '/bootstrap.php'; $marc_file = new File_MARC($dir . '/' . 'music.mrc'); print "Test with a simple string\n"; while ($marc_record = $marc_file->next()) { print "\nNext record:\n"; $fields = $marc_record->getFields('650'); foreach ($fields as $field) { print $field; print "\n"; } } print "\nTest with regular expression\n"; $marc_file = new File_MARC($dir . '/' . 'music.mrc'); while ($marc_record = $marc_file->next()) { print "\nNext record:\n"; $fields = $marc_record->getFields('00\d', true); foreach ($fields as $field) { print $field; print "\n"; } } ?> --EXPECT-- Test with a simple string Next record: 650 0 _aJazz. 650 0 _aMotion picture music _vExcerpts _vScores. Next record: 650 0 _aJazz _y1971-1980. Next record: 650 0 _aJazz. Test with regular expression Next record: 001 000073594 004 AAJ5802 005 20030415102100.0 008 801107s1977 nyujza Next record: 001 001878039 005 20050110174900.0 007 sd fungnn|||e| 008 940202r19931981nyujzn i d Next record: 001 001964482 005 20060626132700.0 007 sd fzngnn|m|e| 008 871211p19871957nyujzn d
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 784.88 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A