top_left top_right
bottom_left
Next Event: Unknown | Forum Rules | QGL Website | Event Registration
openFolder AusForums.com
iconwatfolderLineopenFolder LANs
iconwatfolderLineopenFolder QGL
iconwatfolderLineopenFolder QGL Forum
Author
Topic: php.net redesign
thermite
Posts: 8803
Location: Brisbane, Queensland
Just found out php.net is redesigning their site.

Work in progress here:
http://prototype.php.net

Function documentation example: http://prototype.php.net/array_shift

system
--
Raven
Posts: 6433
Location: Melbourne, Victoria
Great, but instead can they hurry up and redesign PHP?
scuzzy
Posts: 15118
Location: Brisbane, Queensland
Documentation pages look quite nice

Edit: eww the search feature is all bingy

last edited by scuzzy at 14:05:02 27/Jan/12
teq
Posts: 12388
Location: Brisbane, Queensland

Great, but instead can they hurry up and redesign PHP?


the amount of people i hear bitching about "how s*** php is" yet can't quantify their reasoning is mind boggling
the vast vast majority of people who use php will never meet or exceed its capabilities

there is always a better alternative, but people love ragging on php
Raven
Posts: 6437
Location: Melbourne, Victoria
Yes, but when I do it I'm just trolling :P~

Seriously though, i'd like to see PHP with strong types and structs/tables.
simul
Posts: 1293
Location: Brisbane, Queensland
I'll happily argue against anyone who says there is a better web language than PHP (and can justify).

PHP redesign - looks nice, although will take quite a bit to get used to.
thermite
Posts: 8804
Location: Brisbane, Queensland
Oh noes some open source software doesn't work in the exact way you want!

Real programming happens in algorithms, not specific language features.
Hogfather
Posts: 11758
Location: Cairns, Queensland

I'm not a fan of PHP but I'll happily admit that its ignorance and that I live in a fluffy safe MS developer's bubble that I have no desire to step out of.
simul
Posts: 1294
Location: Brisbane, Queensland
Seriously though, i'd like to see PHP with strong types and structs/tables.


Both of these you can get around for the most part via OO.
Hogfather
Posts: 11759
Location: Cairns, Queensland

Since you're answering questions simul, what's the language support for OO like these days? Is it fully featured or do you need to work around its limitations to implement design patterns?
Raven
Posts: 6439
Location: Melbourne, Victoria
thermite, all I want is for the compiler to tell me "hey, that data isn't quite what you think it is at compile-time".

And because
foo = {
{ a, b, c},
{ d, e, f},
{ g, h, i},
};

Is much quicker than
$blah[0]->first = 'a';
$blah[0]->second = 'b';
$blah[0]->third = 'c';
$blah[1]->first = 'd';
$blah[2]->second = 'e';
$blah[3]->third = 'f';
... etc...
Or any way you can implement it using methods.

I'd love to paste an example using the ircd Message struct, but don't have the source in front of me right at the moment.
thermite
Posts: 8805
Location: Brisbane, Queensland
My philosophies as a programmer prevent me from giving a s*** about how long it takes to assemble a data structure in order to display something on a web page. Invent a faster server.

I code for the quantum future of tomorrow.

last edited by thermite at 15:10:39 27/Jan/12
simul
Posts: 1295
Location: Brisbane, Queensland
Since you're answering questions simul, what's the language support for OO like these days? Is it fully featured or do you need to work around its limitations to implement design patterns?


Its got pro's and con's, nothing that you can't get around. Supports inheritance and interfaces well enough, class/static functionality works as expected. Doesn't support multi-inheritance (which you can argue leads to bad class design), and because its weakly typed polymorphism isn't a huge deal (although can be enforced via typeOf).
Hogfather
Posts: 11760
Location: Cairns, Queensland

So you don't give a s*** about performance and scalability as a programmer? And the kids are calling that a philosophy these days?
Its got pro's and con's, nothing that you can't get around. Supports inheritance and interfaces well enough, class/static functionality works as expected. Doesn't support multi-inheritance (which you can argue leads to bad class design), and because its weakly typed polymorphism isn't a huge deal (although can be enforced via typeOf).

I've always been a bit meh on multi-inheritance. C# doesn't support it either and its never made me cry.

I'm a really, really bad typer though, and its not getting any better. I sort of rely on strong typing and the ability to compile an app (php is interpreted, right?)
thermite
Posts: 8806
Location: Brisbane, Queensland
I am strongly against pre-emptive performance optimisation. And certainly making a fuss over the speed of assembling a small 3x3 data structure for a webpage.
Hogfather
Posts: 11761
Location: Cairns, Queensland

I am strongly against pre-emptive performance optimisation.

What the hell does that mean?
And certainly making a fuss over the speed of assembling a small 3x3 data structure for a webpage.

Sloppy, imo anyway.
simul
Posts: 1296
Location: Brisbane, Queensland
thermite, all I want is for the compiler to tell me "hey, that data isn't quite what you think it is at compile-time".


Definitely benefits of it, but due to it being interpretive I wouldn't want to lose speed every load forever over a bit more time spent debugging/defensive programming initially.


And because
foo = {
{ a, b, c},
{ d, e, f},
{ g, h, i},
};

Is much quicker than
$blah[0]->first = 'a';
$blah[0]->second = 'b';
$blah[0]->third = 'c';
$blah[1]->first = 'd';
$blah[2]->second = 'e';
$blah[3]->third = 'f';
... etc...
Or any way you can implement it using methods.


You can just create an associative array and cast it to an object, ala:

$data = array('firstname'=>'joe','lastname'=>'blogs);
$object = (object)$data;
echo $object->firstname;

User defined objects are a bit of a pain for typecasting but you can override the cast method for IDE support.
simul
Posts: 1297
Location: Brisbane, Queensland
I'm a really, really bad typer though, and its not getting any better. I sort of rely on strong typing and the ability to compile an app (php is interpreted, right?)


Interpreted via apache etc, but there are compilers as well (Facebook is all built on PHP but via their own compiler (HipHop)).
thermite
Posts: 8807
Location: Brisbane, Queensland
What the hell does that mean?


Sorry it's called "Premature Optimization" by Knuth. It is defined as "optimizing before we know that we need to".
"Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."


Basically, don't bother with it when writing new code. Of course it does not mean the same thing as "write dumb code".

Just don't sweat over it, do what you have to, do it the right way, make it readable. Concentrate on performance when you identify that there is a problem.

PornoPete
Posts: 733
Location: UK

Amen thermite Amen,

I have definitely wasted time in the past trying to optimize code, which ended yielding performance benefits which simply didn't justify the time spent.

Not that I am a particularly good coder or anything, but Knuth sounds right. Until you know there is a problem optimization could well be a waste of time.
scuzzy
Posts: 15120
Location: Brisbane, Queensland
I just hate the inconstancy like random ordering of needle/haystack on string functions, underscores or no underscores, array functions that return the array and others that are passed by reference.
Dazhel
Posts: 4368
Location: Gold Coast, Queensland

My philosophies as a programmer prevent me from giving a s*** about how long it takes to assemble a data structure in order to display something on a web page. Invent a faster server.


I read this as "I don't care much about performance because none of the web applications I've been asked to create so far have had minimum performance requirements specified in the user acceptance criteria"
Thundercracker
Posts: 3121
Location: Brisbane, Queensland

I'm so out of touch with the PHP community these days after selling my soul to microsoft (and loving it) :D

What is tool support like? Do people use MVC style patterns? Do a lot of people just do it like classic asp or perl (or naughty C#) where its just markup and logic all mixed into a wonderful mash?

How about PHP's caching model? I assume you use 3rd party libraries to do stuff like servers-side session state or caching or whatever?
simul
Posts: 1298
Location: Brisbane, Queensland
What is tool support like?


Good, the wild west days are for the most part gone - usually only a few well recognised libraries for most things.

Do people use MVC style patterns?


Yep, most mainstream frameworks on top of PHP are MVC based (emulating rails convention > configuration) - but theres still the legacy wordpress/joomla mess around.

Do a lot of people just do it like classic asp or perl (or naughty C#) where its just markup and logic all mixed into a wonderful mash?


Nah templating systems (smarty etc) are fairly commonplace now at least for larger work, but still supports blended messes of s*** are still fine.

How about PHP's caching model? I assume you use 3rd party libraries to do stuff like servers-side session state or caching or whatever?


Its built in, but most MVC frameworks provide custom implementations (memcache, redis etc)
Pinky
Posts: 12420
Location: Melbourne, Victoria

The redesign looks nice but not a massive change IMO, really.

Love PHP.
Thundercracker
Posts: 3122
Location: Brisbane, Queensland

That all sounds pretty decent simul.
system
--
Not a new post since your last visit.
New Post Since your last visit
Back To Forum
Advertise with Us | Privacy Policy | Contact Us
© Copyright 2001-2026 AusGamers Pty Ltd. ACN 093 772 242.
Hosted by Mammoth Networks - Australian VPS Hosting
Web development by Mammoth Media.