How many lines of code are there currently?

When they are cleanly indented, the tab/newline counts as whitespace to be output, causing a space between them on the second example
Aaaahh! That's annoying. I am upset now. :P But it turns out that any inline elements behave like this. Try:
HTML:
<body>
<p>
<img src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" /><img src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" />
</p>
</body>
and
HTML:
<body>
<p>
<img src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" />
<img src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" />
</p>
</body>
 
There's nothing illogical, unclear, or confusing about the ternary operator. Use it where it's appropriate and use an if statement where appropriate. ;)

It's the conditional operator. Just happens to be ternary. :)

Nitpicking aside, I agree that there's nothing illogical about it. Nested conditional operators without parenthesis are confusing, though, but that's another story.
 
Only way I'm aware to get rid of that white-space AND have your inline elements on separate lines is put the white-space in comments:
Code:
<span>A</span><!--

--><span>B</span>
 
I love bringing extrem old threads backs, so here we go:D

Some beta6 metrics:
Directories: 404
Files: 1978

Lines of Code (LOC): 406825
Cyclomatic Complexity / Lines of Code: 0.11
Comment Lines of Code (CLOC): 159406
Non-Comment Lines of Code (NCLOC): 247419

Namespaces: 0
Interfaces: 56
Classes: 1887
Abstract: 170 (9.01%)
Concrete: 1717 (90.99%)
Average Class Length (NCLOC): 134
Methods: 13665
Scope:
Non-Static: 12338 (90.29%)
Static: 1327 (9.71%)
Visibility:
Public: 10381 (75.97%)
Non-Public: 3284 (24.03%)
Average Method Length (NCLOC): 18
Cyclomatic Complexity / Number of Methods: 2.97

Anonymous Functions: 0
Functions: 33

Constants: 3375
Global constants: 4
Class constants: 3371
without Zend Directory:
Directories: 133
Files: 792

Lines of Code (LOC): 138432
Cyclomatic Complexity / Lines of Code: 0.10
Comment Lines of Code (CLOC): 39411
Non-Comment Lines of Code (NCLOC): 99021

Namespaces: 0
Interfaces: 13
Classes: 748
Abstract: 62 (8.29%)
Concrete: 686 (91.71%)
Average Class Length (NCLOC): 136
Methods: 5287
Scope:
Non-Static: 4784 (90.49%)
Static: 503 (9.51%)
Visibility:
Public: 3700 (69.98%)
Non-Public: 1587 (30.02%)
Average Method Length (NCLOC): 19
Cyclomatic Complexity / Number of Methods: 2.80

Anonymous Functions: 0
Functions: 33

Constants: 225
Global constants: 3
Class constants: 222

0.29% duplicated lines out of 138432 total lines of code. (checked with phpcpd default settings => 5 identical lines and 70 identical tokens )
 
Update for RC1:
with zf:
Directories: 403
Files: 1974

Lines of Code (LOC): 407341
Cyclomatic Complexity / Lines of Code: 0.11
Comment Lines of Code (CLOC): 159531
Non-Comment Lines of Code (NCLOC): 247810

Namespaces: 0
Interfaces: 56
Classes: 1890
Abstract: 170 (8.99%)
Concrete: 1720 (91.01%)
Average Class Length (NCLOC): 134
Methods: 13690
Scope:
Non-Static: 12361 (90.29%)
Static: 1329 (9.71%)
Visibility:
Public: 10399 (75.96%)
Non-Public: 3291 (24.04%)
Average Method Length (NCLOC): 18
Cyclomatic Complexity / Number of Methods: 2.97

Anonymous Functions: 0
Functions: 30

Constants: 3376
Global constants: 4
Class constants: 3372


without zf
Directories: 132
Files: 788

Lines of Code (LOC): 138948
Cyclomatic Complexity / Lines of Code: 0.10
Comment Lines of Code (CLOC): 39536
Non-Comment Lines of Code (NCLOC): 99412

Namespaces: 0
Interfaces: 13
Classes: 751
Abstract: 62 (8.26%)
Concrete: 689 (91.74%)
Average Class Length (NCLOC): 136
Methods: 5312
Scope:
Non-Static: 4807 (90.49%)
Static: 505 (9.51%)
Visibility:
Public: 3718 (69.99%)
Non-Public: 1594 (30.01%)
Average Method Length (NCLOC): 19
Cyclomatic Complexity / Number of Methods: 2.81

Anonymous Functions: 0
Functions: 30

Constants: 226
Global constants: 3
Class constants: 223
 
It's a boring day in the office so here the new values for xf 1.0.1^^

without zf
Code:
C:\Users\ragtek\Downloads>phploc xenforo_1.0.1_full_withoutZF\upload
phploc 1.5.1 by Sebastian Bergmann.

Directories:                                        137
Files:                                              833

Lines of Code (LOC):                            148060
  Cyclomatic Complexity / Lines of Code:          0.10
Comment Lines of Code (CLOC):                    42121
Non-Comment Lines of Code (NCLOC):              105939

Namespaces:                                          0
Interfaces:                                          13
Classes:                                            788
  Abstract:                                          71 (9.01%)
  Concrete:                                        717 (90.99%)
  Average Class Length (NCLOC):                    138
Methods:                                          5521
  Scope:
    Non-Static:                                    4954 (89.73%)
    Static:                                        567 (10.27%)
  Visibility:
    Public:                                        3857 (69.86%)
    Non-Public:                                    1664 (30.14%)
  Average Method Length (NCLOC):                    19
  Cyclomatic Complexity / Number of Methods:      2.88

Anonymous Functions:                                  0
Functions:                                          31

Constants:                                          234
  Global constants:                                  4
  Class constants:                                  230

with zf
Code:
C:\Users\ragtek\Downloads>phploc xenforo_1.0.1_full_withZF\upload
phploc 1.5.1 by Sebastian Bergmann.

Directories:                                        408
Files:                                            2019

Lines of Code (LOC):                            416453
  Cyclomatic Complexity / Lines of Code:          0.11
Comment Lines of Code (CLOC):                    162116
Non-Comment Lines of Code (NCLOC):              254337

Namespaces:                                          0
Interfaces:                                          56
Classes:                                          1927
  Abstract:                                        179 (9.29%)
  Concrete:                                        1748 (90.71%)
  Average Class Length (NCLOC):                    135
Methods:                                          13899
  Scope:
    Non-Static:                                  12508 (89.99%)
    Static:                                        1391 (10.01%)
  Visibility:
    Public:                                      10538 (75.82%)
    Non-Public:                                    3361 (24.18%)
  Average Method Length (NCLOC):                    18
  Cyclomatic Complexity / Number of Methods:      3.00

Anonymous Functions:                                  0
Functions:                                          31

Constants:                                        3384
  Global constants:                                  5
  Class constants:                                3379
 
I'm confused why anyone would want to know this? It might be a fun fact for a trivia but lines != quality
I agree. A city I worked for had an AS400 that we used a software package on. The code was massive and a mass of spaghetti. Company we purchased a new package from was about a third smaller in code, offered more features and also a court package and it ran on the same hardware noticeably faster than the old stuff.

The number of "lines of code" in itself indicate nothing. The only times that it "may" is if the lines of code are compared to other code that performs the same function.
 
Top Bottom