Skip to content

u/colshrapnel

In this archive from Oct 2015 to Dec 2026

131
posts
11k
comments
67
media
36k
score
146 saved before deletion

TIL free tier Claude can create a Linux VM, which means it can run your PHP code

For a long time I was under the impression that Claude has only a Python sandbox. But today I discovered that it can run literally anything, PHP included. Like, if I ask Write a PHP code that outputs all 2-digit fibonacci numbers, run it and give me the code and the output. before installing PHP, re...

0 points2 comments
Open on Reddit

ELI5, why a namespaced function call is not gets optimized, when the function's result is not used?

When toying with the code from the recent post on namespaced function calls, I've got strange results: when I removed $result2 = from the namespaced call, its timing became as slow as a global function call. So I wrote a simple PHP script and checked its opcodes <?php namespace SomeNamespace; \s

1 points0 comments
Open on Reddit

Another recount on breaking into a retired PHP app (RainLoop) using textbook vulnerabilities (unserialize, not checking file paths, etc.).

Unlike the other time, it seems there is no English text available, so just a short recount by yours truly. Although RainLoop web-mail client looks extremely dated, and its Github repo is in the archived state, it was listed as an obscure web-mail option by

29 points1 comments
Open on Reddit

Sadly, but the professional lever of average /r/php participant is unacceptably low

This sub made an AI generated low effort list of pathetically trivial statements the all time fourth top post. It means that most of subscribers cannot comprehend anything more complex, let alone some truly interesting or useful content, which gets a few dozen points at max. This is the actual avera...

0 points6 comments
Open on Reddit

Is phpdotenv a generic approach for all environments or just a fallback for local dev?

The twelve-factor app stores config in environment variables I always took [this 12factor recommendation] at face value, which, to me, is actually "editing virtual hosts in Apache or Nginx" (or setting a true env variable any other way). While storing env-sensitive options in a file being just a fal...

24 points29 comments
Open on Reddit

Comparing programming languages' popularity by counting active questions on Stack Overflow

Recently I've got an idea to compare the popularity of different languages by measuring the number of active (new or updated) questions in Stack Overflow. So I did. The idea is simple, just open the question list by the tag, scroll down and see when the last question was changed. Which means the amo...

6 points7 comments
Open on Reddit

The tide has turned: PHP manual started to promote the correct error reporting practice

There is a fantastic guy that goes under the nickname Dharman on Stack Overflow, thanks to whose persistence and effort it was made possible. For decades the PHP manual featured ridiculous and noobish way to check for errors, that notorious and unprofessional if ($mysqli->connect_error) { die('Conne...

227 points65 comments
Open on Reddit

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.