mjaschen, to php German
@mjaschen@digitalcourage.social avatar

Wochenrückblick, Ausgabe 39 (2024-18).

Diesmal mit

  • 🗺️ der Bikerouter Hall of Fame aller Supporterinnen bisher ❤️
  • 🚵‍♂️ neuen Reifen für das Crosser-Gravel-Dings und der ersten Ausfahrt damit – unter Anderem zu Deutschlands größter (!) Wüste (!!)
  • 💻 den Erkenntnissen von @atomicpoet zur Ergonomie beim Arbeiten mit dem Notebook vs. Desktop-Computer und wie sich das mit meinen Erfahrungen deckt
  • 🤖 ollama, welches die Möglichkeit bietet, LLMs bequem auf dem eigenen Rechner laufen zu lassen
  • 🐘 cachetool, einem Werkzeug zum Verwalten des PHP opcache
  • 🍎 dem Blick in mein macOS-Applications-Directory: diesmal gibt's den Blick auf alle Apps, die mit „F“ beginnen
  • 🛠️ noch mal Deployment des Blogs, das läuft jetzt tatsächlich mit einem simplen post-merge Hook in Git
  • 🔊 und wie immer Techno

https://www.marcusjaschen.de/blog/2024/2024-18/

Properly restart Opcache after deployment (tideways.com)

When you are deploying code to a server and not with containers then it is critical to know how to properly restart Opcache. Why? Opcache never throws old files out of the cache. Therefore, if a new version is deployed in a completely new directory, all files from the old version will remain in the [...]

sebastian, to php
@sebastian@phpc.social avatar

The extension optimizes bytecode.

Extensions for collecting code coverage data such as operate on this bytecode.

Naturally, whether or not bytecode optimization is performed has an impact on the code coverage data that is collected.

I kn(e|o)w this. But such a difference just really surprised me for the first time.

Code Coverage reported with bytecode optimization enabled

sebastian,
@sebastian@phpc.social avatar

For , PHP_BINARY can never be ''. Therefore, the code after the if statement's code is optimized away.

sebastian,
@sebastian@phpc.social avatar

The code after the body of the if statement predates the PHP_BINARY constant, which was introduced in PHP 5.4, IIRC.

The fact that optimizes this code away suggests that I probably can get rid of it ...

sebastian,
@sebastian@phpc.social avatar

Maybe I should dust off the proof-of-concept I did for a tool that finds code that is optimized away by years ago:

https://github.com/sebastianbergmann/foal

sebastian,
@sebastian@phpc.social avatar

Unfortunately, 's bytecode dumping still does not show which line of code an opcode came from.

Unless I'm missing something, VLD is still needed for that.

https://gist.github.com/sebastianbergmann/bb9c8ab2285555f8d7a33022b4257c37

schenklklopfer, to php German
@schenklklopfer@chaos.social avatar

Ich habe da einen Container.

Der kam irgendwann mal FROM php:apache

Ich hab dem in die ini reingeschrieben:
opcache.enable_cli=1

Aber auf der Bash sehe ich mit "php -i | grep opcache" keine Ausgabe.
Also ist der nicht an, oder?

Aber warum?
Der Rest aus der php.ini wird ja auch geladen.
Die Extension 'opcache.so' liegt auch rum, warum wird die nicht geladen?

Der default Wert für opcache.enable ist "1".
Also sollte die zumindest immer an sein, aber auch den sehe ich nicht.

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