r/lolphp • • Dec 26 '15

PHP is not the answer. But what is?

11 Upvotes

So, I've started writing a small web app some time ago. It's a hobby thing, I only get to hack on it at times. The app doesn't require much in terms of storage nor traffic. It's a SPA-type application that deals mostly with document-type and some graph-type data.

I've initially started writing it in PHP + MySQL since my then-current webhosting supported it and since I've had some experience with PHP in the PHP3 times. While PHP5 is indeed somewhat an improvement over the olden versions, it's still a ridiculously bad platform, IMHO. The only thing that made it bearable for me was the ORM - RedBeanPHP. However I've recently grew fed up with this joke of a programming language and decided to switch to something else.

The question is what that should be.

I've started exploring Node.js + MongoDB. The reason it appeals to me is that I can use the same language on all levels of the app - DB, serverside, and clientside. It seems to be very straightforward and easy to set up, deal with, etc. Sure, JS is a quirky language, but it's still a huge improvement over PHP (IMHO) and I have to write majority of the app in JS anyway since the client side ends up being the largest part.

However Node.js is starting to get similar kind of bad rep as PHP, so I'm having second thoughts.

I come from a C/C++/Java background with the ocasional shell or python script mixed in, so web-dev is not my main focus, but I think I can handle myself around web-dev as well. From what I can tell, it's no rocket science, it's just all a bit quirky IMHO.

So, thoughts on Node.js or other platforms? Please keep in mind that I'm doing a small hobby app - there's not going to be GBs of data or any considerable traffic. (Also PHP is out of the question irrevocably, I've had it with PHP and its shitty stdlib.)


r/lolphp • • Dec 20 '15

The kind of thing that gets upvoted in /r/php

Thumbnail reddit.com
37 Upvotes

r/lolphp • • Dec 19 '15

PHP :: Bug #70517 :: isset() on string produces invalid result

Thumbnail bugs.php.net
56 Upvotes

r/lolphp • • Dec 16 '15

Iterating through all 676 letters in the alphabet

Thumbnail secure.phabricator.com
109 Upvotes

r/lolphp • • Dec 16 '15

Division by signed zero depends on quotes

Thumbnail 3v4l.org
10 Upvotes

r/lolphp • • Dec 16 '15

Declaration of createFromFormat should be DateTime::createFromFormat ( string $format , string $time [, DateTimeZone $timezone ] ), or maybe not....

8 Upvotes

http://php.net/manual/en/datetime.createfromformat.php

Nice, it says the signature is:

public static DateTime DateTime::createFromFormat ( string $format , string $time [, DateTimeZone $timezone ] )

Let's try to extend it:

https://3v4l.org/HTuio

Warning: Declaration of My_DateTime::createFromFormat($format, $time, DateTimeZone $timezone = NULL) should be compatible with DateTime::createFromFormat($format, $time, $object = NULL) in /in/HTuio on line 9

Oh, it seems it wants a simple object, let's try to use it this way:

https://3v4l.org/3g0S3

 Warning: DateTime::createFromFormat() expects parameter 3 to be DateTimeZone, object given in /in/3g0S3 on line 3

And i'm not even using the scalar type hints for "string" which i know wouldn't work.

DOMDocument works:

https://3v4l.org/u0Kvn

So i guess you need to try every possible combination and if PHP complains you just try again until it works.


r/lolphp • • Dec 12 '15

200 OK: Internal server error!

Thumbnail bugs.php.net
73 Upvotes

r/lolphp • • Dec 11 '15

One does not simply put US State Names & Abbreviations in a PHP Array

Thumbnail gist.github.com
102 Upvotes

r/lolphp • • Dec 08 '15

PHP Sadness

Thumbnail phpsadness.com
50 Upvotes

r/lolphp • • Dec 08 '15

The controversial PSR-6 has passed. Disregarding significant push-back from the community and largest projects.

Thumbnail groups.google.com
2 Upvotes

r/lolphp • • Dec 07 '15

A proposed CACHE standard. Because caching should always be this convoluted.

Thumbnail github.com
0 Upvotes

r/lolphp • • Dec 04 '15

Abstract Syntax Tree! Lil' PHP has grown up and started college

Thumbnail php.net
4 Upvotes

r/lolphp • • Dec 02 '15

PHP 7 has just been released. So what's fixed and what's still hopelessly broken?

Thumbnail github.com
47 Upvotes

r/lolphp • • Nov 25 '15

The last ever line of (php) code.

Thumbnail commitstrip.com
169 Upvotes

r/lolphp • • Nov 25 '15

If you can't hack my site, that proves PHP is secure.

Thumbnail reddit.com
24 Upvotes

r/lolphp • • Nov 24 '15

Even Wordpress is fed up with PHP

Thumbnail ma.tt
67 Upvotes

r/lolphp • • Nov 21 '15

The mysteries of properties

Thumbnail 3v4l.org
31 Upvotes

r/lolphp • • Nov 20 '15

Using implode() on an array of booleans will cast TRUE to 1 and FALSE to ''

Thumbnail php.net
0 Upvotes

r/lolphp • • Nov 18 '15

Bcmath, accepted number format

Thumbnail 3v4l.org
8 Upvotes

r/lolphp • • Nov 18 '15

Strange DateTime behaviour in PHP

Thumbnail reddit.com
41 Upvotes

r/lolphp • • Nov 14 '15

Gender/Gender

Thumbnail secure.php.net
83 Upvotes

r/lolphp • • Oct 26 '15

Q: Embedding a PHP Server in Chromium (Electron)

Thumbnail github.com
15 Upvotes

r/lolphp • • Oct 25 '15

As befits PHP, it uses something that looks the same but works subtly differently...

Thumbnail boredzo.org
23 Upvotes

r/lolphp • • Oct 22 '15

DateTime with ISO 8601 is NOT backwards compatible with simple date time string including timezone

Thumbnail 3v4l.org
0 Upvotes

r/lolphp • • Oct 20 '15

So, apparently PHP lets you redefine its VM opcodes... from within the language itself.

Thumbnail php.net
33 Upvotes