php

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

phareous, in ZCE is dead

It makes me sad about the demise of Zend and everything they offered PHP

abhibeckert, in RFC: DOM HTML5 parsing and serialization

Based on this limited experiment, I conclude that the performance is acceptable.

Uh no - looking just at the results of the test, parsing 18KB of HTML should be faster than three seconds.

rikudou,

Yeah, doesn’t sound very acceptable.

tsonfeir, in Event loop using Fibers
@tsonfeir@lemm.ee avatar

Does anyone use this? It’s doesn’t seem very efficient to use PHP for this kind of thing.

rikudou,

What kind of thing do you mean? Async is used in PHP, though not many people roll out their own event loop, that article is more for people who want to know how it works. Previously generators were used for native async support, nowadays fibers.

parpol, in Any suggestions??

Pure php is rarely used anymore. If you’re building a site with php, I would use PHP Laravel.

Also, php is gradually becoming statically typed, so make sure to follow the PSR-12 coding standard.

Weirdfish, in Any suggestions??

Well, I learned PHP back around 2002, and still use it today for a lot of smaller projects.

If you have a windows machine, I suggest getting W.A.M.P, windows apache mysql php. If you are doing linux, get L.A.M.P.

Free simple install, gets it all going.

Once installed, launch the web server and you are live.

Your local host folder will be in wamp/www I believe, but there will be a default index.htm in there. If you don’t have any port reatrictions, you can access from any device on the network, phone, another laptop, etc.

For an editor, I like dev-php, or php-dev, can’t remember and I’m a touch dyslexic. Either way, it’s free, and does nice html/ php/javascript etc highlighting.

I’m oldschool, and write basically everything from scratch.

When it comes to frameworks and such, I can’t be of help.

One big addition to php that may be new to you are sessions. Cookie based variables that are stored server side so you don’t have to pass all info in the get string all the time.

You add session start to the beginning of your code, and any variables stored in $_SESSION[‘name’] are permanent for as long as the cookie is good. Great for login, page management, anything you don’t want to keep passing as a get or post string, but is too trivial to put into a database.

Other than that, there are a ton of great online resources, just google what ever you are trying to do and include php.

I know people like to shit on php, and there are other great languages and tools out there, but its what I learned, and is still my go to for most web based things.

Good luck to you

moog, in Any suggestions??

www.w3schools.com/php/

W3Schools really helped me refresh my memory with Javascript when I got back into it after a hiatus. They have a PHP course as well that Im sure would help you out.

buzz, in Anybody used Swoole?
@buzz@lemmy.world avatar

I use swoole on a huge monetized US site. I’ve used the mezzio framework with openswoole, but unfortunately the integration with various swoole features is just not there in mezzio. So I had to backport some hyperf components which is something I would rather not do.

these days I would use hyperf for all of my PHP projects going forward if I cannot migrate them away from PHP, roadrunner would be in the second place.

erdemkose, in Anybody used Swoole?

You can really get a huge performance gain (+10x) with Swoole or any other event loop. The problem is that they require a different approach in your code and you cannot easily rely on 3rd party libraries anymore. You need to make sure that your app does not have memory leak, and can handle concurrent requests.

If I were to create a new app in PHP, I would definitely consider ReactPHP, Swoole, OpenSwoole, Roadrunner or the latest player FrankenPHP.

Dar1as, in Welcome

<php echo ‘Hello’; ?>

TCB13,
@TCB13@lemmy.world avatar

So… when are we voting to deprecate and remove echo? :D

Madpeter,
@Madpeter@lemmy.world avatar

never ^_^ its echo all the way down.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php@lemmy.world
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines