Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | private function _getMixcloudUrl() |
||
23 | { |
||
24 | if (substr($this->_code, 0, 7) == 'http://' || substr($this->_code, 0, 8) == 'https://') { |
||
25 | return $this->_code; |
||
26 | } else { |
||
27 | $matches = []; |
||
28 | preg_match('%mixcloudLoader\.swf\?feed=(.+?)&embed_uuid%', $this->_code, $matches); |
||
29 | |||
30 | return isset($matches[1]) ? urldecode($matches[1]) : null; |
||
31 | } |
||
32 | } |
||
33 | |||
50 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: