summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/phi_remove_001.phpt
blob: d8c1a64eec8a8af1739db6b1301701d4a7daba97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
--TEST--
Phi sources remove 001
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
function getOnlyMPEGaudioInfoBruteForce($info) {
    $Distribution['bitrate']      = array();
    $Distribution['frequency']    = array();
    $Distribution['layer']        = array();
    $Distribution['version']      = array();
    $Distribution['padding']      = array();

    $max_frames_scan = 5000;
    $frames_scanned  = 0;

    $previousvalidframe = $info['avdataoffset'];
    while ($info) {
        if (!isset($MPEGaudioHeaderDecodeCache[$head4])) {
            $MPEGaudioHeaderDecodeCache[$head4] = MPEGaudioHeaderDecode($head4);
        }
        if (!isset($MPEGaudioHeaderValidCache[$head4])) {
            $MPEGaudioHeaderValidCache[$head4] = MPEGaudioHeaderValid($MPEGaudioHeaderDecodeCache[$head4], false, false);
        }
        if ($MPEGaudioHeaderValidCache[$head4]) {

            if ($MPEGaudioHeaderLengthCache[$head4] > 4) {
                $WhereWeWere = mftell();
                $next4 = test(4);
                if ($next4[0] == "\xFF") {
                    if (!isset($MPEGaudioHeaderDecodeCache[$next4])) {
                        $MPEGaudioHeaderDecodeCache[$next4] = MPEGaudioHeaderDecode($next4);
                    }
                    if (!isset($MPEGaudioHeaderValidCache[$next4])) {
                        $MPEGaudioHeaderValidCache[$next4] = MPEGaudioHeaderValid($MPEGaudioHeaderDecodeCache[$next4], false, false);
                    }
                    if ($MPEGaudioHeaderValidCache[$next4]) {
                        getid3_lib::safe_inc($Distribution['bitrate'][$LongMPEGbitrateLookup[$head4]]);
                        getid3_lib::safe_inc($Distribution['layer'][$LongMPEGlayerLookup[$head4]]);
                        getid3_lib::safe_inc($Distribution['version'][$LongMPEGversionLookup[$head4]]);
                        getid3_lib::safe_inc($Distribution['padding'][intval($LongMPEGpaddingLookup[$head4])]);
                        getid3_lib::safe_inc($Distribution['frequency'][$LongMPEGfrequencyLookup[$head4]]);
                        if ($max_frames_scan && (++$frames_scanned >= $max_frames_scan)) {
                            foreach ($Distribution as $key1 => $value1) {
                                foreach ($value1 as $key2 => $value2) {
                                    $Distribution[$key1][$key2] = round($value2 / $pct_data_scanned);
                                }
                            }
                            break;
                        }
                        continue;
                    }
                }
                unset($next4);
            }

        }
    }
    return true;
}
?>
okey
--EXPECT--
okey