Branch Coverage

lib/PHP/Decode/Tokenizer.pm
Criterion Covered Total %
branch 153 220 69.5


line true false branch
47 1 268 unless ($s =~ /\G([^\\\$\{]*)([\\\$\{]|$)/cgs)
53 249 19 if ($2 ne "\\")
55 22 227 if ($2 eq '$') { }
13 214 elsif ($2 eq '{') { }
57 19 3 if ($s =~ /\G([a-zA-Z_\x80-\xff][\w\x80-\xff]*)((\:\:|\-\>)([a-zA-Z_\x80-\xff][\w\x80-\xff]*))?/cgs) { }
59 4 15 if (defined $cont)
69 0 19 if (defined $2 and $2 ne "")
73 4 15 if ($s =~ /\G(\[)/cgs)
74 4 0 if ($s =~ /\G([^"]*?)\]/cgs) { }
78 2 2 if ($i =~ /^([0-9]+)$/) { }
0 2 elsif ($i =~ /^'(.*)'$/) { }
98 5 8 if ($s =~ /\G(\$)/cgs) { }
99 5 0 if ($s =~ /\G([^"]*?)\}/cgs) { }
101 1 4 if (defined $cont)
104 4 1 if ($w ne "")
109 5 0 if ($v =~ /^([a-zA-Z_\x80-\xff][\w\x80-\xff]*)((\:\:|\-\>)([a-zA-Z_\x80-\xff][\w\x80-\xff]*))?(\[(.*?)\])?$/) { }
113 0 5 if (defined $2 and $2 ne "")
117 2 3 if (defined $5)
121 2 0 if ($i =~ /^([0-9]+)$/) { }
0 0 elsif ($i =~ /^'(.*)'$/) { }
150 0 19 if ($1 eq 'n') { }
0 19 elsif ($1 eq 'r') { }
0 19 elsif ($1 eq 't') { }
0 19 elsif ($1 eq 'v') { }
0 19 elsif ($1 eq 'f') { }
5 14 elsif ($1 eq '\\') { }
0 14 elsif ($1 eq '$') { }
6 8 elsif ($1 eq '"') { }
5 3 elsif ($1 eq 'x') { }
2 1 elsif ($1 ge '0' and $1 le '7') { }
168 5 0 if (defined $1) { }
183 19 196 if (defined $cont) { }
184 8 11 if ($w ne "")
229 18 18401 unless ($self->{'inscript'})
237 2 30 if (defined $quote) { }
2 28 elsif (/\G(["'`])/cgs) { }
0 28 elsif (/\G(\\)/cgs) { }
9 19 elsif (/\G(<)/cgs) { }
239 1 1 if ($quote eq q[']) { }
241 0 3 unless (/\G([^$quote\\]*)([$quote\\])/cgs)
250 1 2 if $2 ne "\\"
259 0 3 unless (/\G([^$quote'\\]*)([$quote'\\])/cgs)
268 0 3 if ($2 eq "'")
272 1 2 if $2 ne "\\"
285 0 0 if (defined $1) { }
293 3 6 if (/\G(\?php)/cgis) { }
6 0 elsif (/\G(\?)/cgs) { }
0 0 elsif (/\G(\?=)/cgs) { }
0 0 elsif (/\G(script\s*language\s*=\s*["']php["']\s*>)/cgis) { }
295 0 3 if ($s ne "")
303 3 3 if ($s ne "")
312 0 0 if ($s ne "")
323 0 0 if ($s ne "")
333 9 10 unless (/\G([^"'`'<\\]+)/cgs)
337 5 4 if ($s ne "")
349 1014 17405 if (defined $quote) { }
1014 16391 elsif (/\G(["'`])/cgs) { }
9 16382 elsif (m[\G(/)]cgs) { }
2 16380 elsif (/\G(#)/cg) { }
2 16378 elsif (/\G(\n)/cgs) { }
3489 12889 elsif (/\G([^\S\n]+)/cgs) { }
0 12889 elsif (/\G([\x01-\x1f\x7f])/cgs) { }
41 12848 elsif (/\G(<)/cgs) { }
38 12810 elsif (/\G(\?)/cgs) { }
0 12810 elsif (/\G(\0)/cgs) { }
2265 10545 elsif (/\G([\[\(\{])/cgs) { }
2257 8288 elsif (/\G([\}\)\]])/cgs) { }
2948 5340 elsif (/\G([>\;\=\,\.\:\&\-\+\|\^\~\%\!\\])/cgs) { }
1840 3500 elsif (/\G(\$)/cgs) { }
1 3499 elsif (/\G(\@)/cgs) { }
534 2965 elsif (/\G([0-9]+)/cgs) { }
2178 787 elsif (/\G([\w\x80-\xff]+)/cgs) { }
358 213 801 if ($quote eq '"') { }
364 0 232 unless (/\G([^$quote\\]*)([$quote\\])/cgs)
369 213 19 if $2 ne "\\"
376 0 815 unless (/\G([^$quote\\]*)([$quote\\])/cgs)
381 801 14 if $2 ne "\\"
383 9 5 if ($1 eq '\\' or $1 eq $quote) { }
395 1 8 if (/\G(\*)/cgs) { }
7 1 elsif (m[\G(/)]cg) { }
397 0 1 unless (m[\G(.*?)\*/]cgs)
413 0 7 unless (/\G(.*?)(\?>|\n|\r\n|\0|$)/cg)
417 1 6 if ($2 eq '?>') { }
0 6 elsif ($2 eq "\n") { }
433 2 0 unless (/\G(.*?)(\?>|\n|\r\n|\0)/cg)
437 0 0 if ($2 eq "?>")
440 0 0 if (/\G(\n|\r\n)/cgs)
455 0 41 if (/\G(\?php)/cgis) { }
0 41 elsif (/\G(\?)/cgs) { }
0 41 elsif (/\G(\?=)/cgs) { }
0 41 elsif (/\G(script\s*language\s*=\s*["']php["']\s*>)/cgis) { }
0 41 elsif ($self->{'inscript'} == 2 and m[\G(/script\s*>)]cgis) { }
2 39 elsif (/\G(<<)/cgs) { }
456 0 0 if ($self->tok_count > 0)
460 0 0 if ($self->tok_count > 0)
464 0 0 if ($self->tok_count > 0)
468 0 0 if ($self->tok_count > 0)
476 0 0 if (/\G(\n|\r\n)/cgs)
483 2 0 if (/\G([\w\pL]+)(\n|\r\n)/cgs) { }
0 0 elsif (/\G\'([\w\pL]+)\'(\n|\r\n)/cgs) { }
486 0 2 unless (/\G(.*?\n)$e(\;)?(\n|\r\n|\0|$)/cgs)
496 0 0 unless (/\G(.*?\n)$e(\;)?(\n|\r\n|\0|$)/cgs)
509 14 24 if (/\G(>)/cgs) { }
515 0 14 if (/\G(\n|\r\n)/cgs)
535 1756 84 if (/\G([a-zA-Z_\x80-\xff][\w\x80-\xff]*)/cgs) { }
547 4 530 if ($v eq '0' and /\G([xX][0-9a-fA-F]+)/cgs) { }
550 6 524 if (/\G(\.[0-9]+)/cgs)
553 0 530 if (/\G([eE][\+\-]?[0-9]+)/cgs)
561 784 3 unless (m<\G([^"'`<>\\/#\s\w\[\]\(\)\{\}\$\?\;\=\,\.\:\&\-\+\|\^\~\%\!]+)>cgs)
569 777 9 if ($self->{'inscript'})